R

setwd("C:/Cancers_paper")

#load("supplementary_info_statistical_significance_calculations_R.RData")
#save.image(file="supplementary_info_statistical_significance_calculations_R.RData")

options(stringsAsFactors = FALSE)
#options(error=recover)
library(reshape2)
library(ggplot2)
library(optimx)
library(sqldf)
library(dplyr)
library(data.table)

data1 = read.table("data_mstoh211_mirna_cisplatin_gemcitabine_ym155.txt", sep = "\t", header = TRUE)

data1$experiment = as.character(data1$experiment)
data1$dose = as.numeric(as.character(data1$dose))
data1$growth = as.numeric(as.character(data1$growth))
data1$log10_dose = log10(data1$dose)

plot_name = 'fig1_data_log.png'
ggplot(data1, aes(x=log10(dose), y=growth, col=experiment)) + geom_point() + facet_wrap(~mirna) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )
plot_name = 'fig1_data.png'
ggplot(data1, aes(x=dose, y=growth, col=experiment)) + geom_point() + scale_x_log10() + facet_wrap(~mirna) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

# The growth values at dose = 0 are higher for all experiments, including C81 control.
# It appears that the act of adding even a control miRNA is having an effect, and thus the true control is C81, not dose = 0.
# The high growth values at dose = 0 does incorrectly impact the modelling for the IC50 inflexion point.
# Thus, remove the first point of dose = 0.

data1 = data1[data1$dose>0,]

data1_ym155 = data1[(data1$drug=="YM155"),]
data1_cis = data1[(data1$drug=="Cisplatin"),]
data1_gem = data1[(data1$drug=="Gemcitabine"),]

plot_name = 'fig1c_ym155_data_log.png'
ggplot(data1_ym155, aes(x=log10(dose), y=growth, col=experiment)) + geom_point() + facet_wrap(~mirna) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )
plot_name = 'fig1c_ym155_data.png'
ggplot(data1_ym155, aes(x=dose, y=growth, col=experiment)) + geom_point() + facet_wrap(~mirna) + scale_x_log10() + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

plot_name = 'fig1a_cisplatin_data_log.png'
ggplot(data1_cis, aes(x=log10(dose), y=growth, col=experiment)) + geom_point() + facet_wrap(~mirna) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

plot_name = 'fig1b_gemcitabine_data_log.png'
ggplot(data1_gem, aes(x=log10(dose), y=growth, col=experiment)) + geom_point() + facet_wrap(~mirna) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


####################################################################################################

# Model (for log-transformed x-axis data):
# A = left asymptote
# B = right asymptote
# xmid = inflection point 1 (IC50 of miRNA-treated cells)
# xmid + xshift = inflection point 2 (IC50 of control cells)
# scal = factor affecting slope at inflection points

# Strategy:
# xshift represents the increase in sensitivity due to miRNA treatment.
# For the model with xshift, is xshift greater than zero and is statistically significant compared to the model without xshift?
# If so, then the difference in IC50 due to miRNA treatment is statistically significant.

predict.1component = function(params, x)
{
	A = params[1]
	B = params[2]
	scal = params[3]
	xmid = params[4]
	prediction_result = A + (B - A) * (1/(1 + exp((xmid - x) / scal)))
	prediction_result
}
loglik.1component = function(params, x, y)
{
	sigma = params[5]
	yhat = predict.1component(params, x)
	residuals = y - yhat
	loglik_result = sum(dnorm(residuals, sd = sigma, log = TRUE))
	loglik_result
}
convert_values_back_to_interpretable.1component = function(params)
{
	names(params) <- NULL 
	xmid = params[4]
	actual_xmid = 10^xmid[[1]]
	c(TC50 = actual_xmid)
}

predict.2component = function(params, x, is_ctl, is_case)
{
	A = params[1]
	B = params[2]
	scal = params[3]
	xmid = params[4]
	xshift = params[5]
	# There is xshift for cases, not for controls. We are testing whether there is a statistically significant xshift.
	final_xshift = is_case * xshift
	prediction_result = A + (B - A) * (1 / (1 + exp((xmid + final_xshift - x) / scal)))
	prediction_result
}
loglik.2component = function(params, x, y, is_ctl, is_case)
{
	sigma = params[6]
	yhat = predict.2component(params, x, is_ctl, is_case)
	residuals = y - yhat
	loglik_result = sum(dnorm(residuals, sd = sigma, log = TRUE))
	loglik_result
}
convert_values_back_to_interpretable.2component = function(params)
{
	names(params) <- NULL 
	xmid = params[4]
	xshift = params[5]
	actual_xmid = 10^xmid[[1]]
	actual_xshift = 10^(xmid[[1]] + xshift[[1]])
	c(ctl_TC50 = actual_xmid, case_TC50 = actual_xshift)
}
convert_values_back_to_interpretable.1component = function(params)
{
	names(params) <- NULL 
	xmid = params[4]
	actual_xmid = 10^xmid[[1]]
	c(TC50 = actual_xmid)
}

assign_start_lower_upper_values = function()
{
	A_start = 100;          A_low = 30;              A_high = 120;
	B_start = 20;           B_low = -10;             B_high = 40;
	scal_start = 0.1;       scal_low = -Inf;         scal_high = Inf;
	xmid_start = 2;         xmid_low = 0;            xmid_high = 4;
	xshift_start = 0.1;     xshift_low = -1;         xshift_high = 2;
	sigma_start = 0.1;      sigma_low = 1e-4;        sigma_high = Inf;

	start.1component   = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   sigma=sigma_start)
	lower.1component   = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     sigma=sigma_low)
	upper.1component   = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    sigma=sigma_high)
	assign("start.1component", start.1component, envir = .GlobalEnv)
	assign("lower.1component", lower.1component, envir = .GlobalEnv)
	assign("upper.1component", upper.1component, envir = .GlobalEnv)
	assign("start2.1component", start2.1component, envir = .GlobalEnv)

	start.2component = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   xshift=xshift_start,   sigma=sigma_start)
	lower.2component = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     xshift=xshift_low,     sigma=sigma_low)
	upper.2component = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    xshift=xshift_high,    sigma=sigma_high)
	assign("start.2component", start.2component, envir = .GlobalEnv)
	assign("lower.2component", lower.2component, envir = .GlobalEnv)
	assign("upper.2component", upper.2component, envir = .GlobalEnv)
}
assign_start_lower_upper_values()

assign_start_lower_upper_values_2 = function()
{
	A_start = 100;          A_low = 30;              A_high = 120;
	B_start = 20;           B_low = -10;             B_high = 40;
	scal_start = 0.1;       scal_low = -Inf;         scal_high = Inf;
	xmid_start = 2;         xmid_low = 0;            xmid_high = 4;
	xshift_start = 1;     xshift_low = -1;         xshift_high = 2;
	sigma_start = 0.1;      sigma_low = 1e-4;        sigma_high = Inf;

	start.1component   = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   sigma=sigma_start)
	lower.1component   = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     sigma=sigma_low)
	upper.1component   = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    sigma=sigma_high)
	assign("start.1component", start.1component, envir = .GlobalEnv)
	assign("lower.1component", lower.1component, envir = .GlobalEnv)
	assign("upper.1component", upper.1component, envir = .GlobalEnv)
	assign("start2.1component", start2.1component, envir = .GlobalEnv)

	start.2component = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   xshift=xshift_start,   sigma=sigma_start)
	lower.2component = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     xshift=xshift_low,     sigma=sigma_low)
	upper.2component = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    xshift=xshift_high,    sigma=sigma_high)
	assign("start.2component", start.2component, envir = .GlobalEnv)
	assign("lower.2component", lower.2component, envir = .GlobalEnv)
	assign("upper.2component", upper.2component, envir = .GlobalEnv)
}
assign_start_lower_upper_values_2()

model_ic50_and_stdev.2component = function(in_data1)
{
	in_data2 = in_data1
	fit_for_all_experiments.2component = optimx(start.2component, function(par) loglik.2component(par, x=in_data2$log10_dose, y=in_data2$growth, is_ctl=in_data2$is_ctl, is_case=in_data2$is_case), lower=lower.2component, upper=upper.2component, method=c("L-BFGS-B"), control=list(fnscale = -1))
	interpretable_values = convert_values_back_to_interpretable.2component(fit_for_all_experiments.2component)
	this_ctl_ic50 = interpretable_values[[1]]
	this_case_ic50 = interpretable_values[[2]]
	list_of_ctl_ic50_for_stdev = NULL
	list_of_case_ic50_for_stdev = NULL
	list_of_experiments = unique(in_data1$experiment)
	for (this_exp in list_of_experiments) {
		in_data2 = in_data1[(in_data1$experiment==this_exp),]
		fit_for_one_experiment.2component = optimx(start.2component, function(par) loglik.2component(par, x=in_data2$log10_dose, y=in_data2$growth, is_ctl=in_data2$is_ctl, is_case=in_data2$is_case), lower=lower.2component, upper=upper.2component, method=c("L-BFGS-B"), control=list(fnscale = -1))
		interpretable_values = convert_values_back_to_interpretable.2component(fit_for_one_experiment.2component)
		this_ctl_ic50_for_stdev = interpretable_values[[1]]
		this_case_ic50_for_stdev = interpretable_values[[2]]
		if (is.null(list_of_ctl_ic50_for_stdev)) {
			list_of_ctl_ic50_for_stdev = this_ctl_ic50_for_stdev
		} else {
			list_of_ctl_ic50_for_stdev = c(list_of_ctl_ic50_for_stdev, this_ctl_ic50_for_stdev)
		}
		if (is.null(list_of_case_ic50_for_stdev)) {
			list_of_case_ic50_for_stdev = this_case_ic50_for_stdev
		} else {
			list_of_case_ic50_for_stdev = c(list_of_case_ic50_for_stdev, this_case_ic50_for_stdev)
		}
	}
	this_ctl_ic50_stdev = sd(list_of_ctl_ic50_for_stdev)
	this_case_ic50_stdev = sd(list_of_case_ic50_for_stdev)
	list(IC50_ctl=this_ctl_ic50, IC50_case=this_case_ic50, IC50_ctl_stdev=this_ctl_ic50_stdev, IC50_case_stdev=this_case_ic50_stdev, model=fit_for_all_experiments.2component)
}
#model_results = model_ic50_and_stdev.2component(data_in)
#model_results
#model_results$IC50_ctl
#model_results$IC50_case
#model_results$IC50_ctl_stdev
#model_results$IC50_case_stdev
#model_results$model$A

model_ic50_and_stdev.1component = function(in_data1)
{
	in_data2 = in_data1
	fit_for_all_experiments.1component = optimx(start.1component, function(par) loglik.1component(par, x=in_data2$log10_dose, y=in_data2$growth), lower=lower.1component, upper=upper.1component, method=c("L-BFGS-B"), control=list(fnscale = -1))
	this_ic50 = convert_values_back_to_interpretable.1component(fit_for_all_experiments.1component)[[1]]
	list_of_ic50_for_stdev = NULL
	list_of_experiments = unique(in_data1$experiment)
	for (this_exp in list_of_experiments) {
		in_data2 = in_data1[(in_data1$experiment==this_exp),]
		fit_for_one_experiment.1component = optimx(start.1component, function(par) loglik.1component(par, x=in_data2$log10_dose, y=in_data2$growth), lower=lower.1component, upper=upper.1component, method=c("L-BFGS-B"), control=list(fnscale = -1))
		this_ic50_for_stdev = convert_values_back_to_interpretable.1component(fit_for_one_experiment.1component)
		if (is.null(list_of_ic50_for_stdev)) {
			list_of_ic50_for_stdev = this_ic50_for_stdev
		} else {
			list_of_ic50_for_stdev = c(this_ic50_for_stdev, list_of_ic50_for_stdev)
		}
	}
	this_stdev = sd(list_of_ic50_for_stdev)
	list(IC50=this_ic50, IC50_stdev=this_stdev, model=fit_for_all_experiments.1component)
}
#model_results = model_ic50_and_stdev.1component(data_in)
#model_results
#model_results$IC50
#model_results$IC50_stdev
#model_results$model$A


########## Statistical significance and inflexion point (IC50) and its standard deviation
########## Figure 1A

assign_start_lower_upper_values_cis = function()
{
	A_start = 100;          A_low = 30;              A_high = 120;
	B_start = 20;           B_low = -10;             B_high = 40;
	scal_start = 0.1;       scal_low = -Inf;         scal_high = Inf;
	xmid_start = 2;         xmid_low = 0;            xmid_high = 4;
	xshift_start = 0.1;     xshift_low = -1;         xshift_high = 2;
	sigma_start = 0.1;      sigma_low = 1e-4;        sigma_high = Inf;

	start.1component   = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   sigma=sigma_start)
	lower.1component   = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     sigma=sigma_low)
	upper.1component   = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    sigma=sigma_high)
	assign("start.1component", start.1component, envir = .GlobalEnv)
	assign("lower.1component", lower.1component, envir = .GlobalEnv)
	assign("upper.1component", upper.1component, envir = .GlobalEnv)
	assign("start2.1component", start2.1component, envir = .GlobalEnv)

	start.2component = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   xshift=xshift_start,   sigma=sigma_start)
	lower.2component = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     xshift=xshift_low,     sigma=sigma_low)
	upper.2component = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    xshift=xshift_high,    sigma=sigma_high)
	assign("start.2component", start.2component, envir = .GlobalEnv)
	assign("lower.2component", lower.2component, envir = .GlobalEnv)
	assign("upper.2component", upper.2component, envir = .GlobalEnv)
}
assign_start_lower_upper_values_cis()


########## Which model is appropriate for miR-486-5p pretreatment before cisplatin treatment?
########## Does it have a lower TC50 than that of C81 pretreatment before cisplatin treatment?
########## Or should both treatments use the same model with the same IC50?
########## p-value is from chi-squared distribution

data2 = data1_cis[data1_cis$mirna %in% c("C81","miR-486-5p"),]
data2$is_ctl = ifelse( (data2$mirna=="C81"), 1, 0 )
data2$is_case = ifelse( (data2$mirna=="C81"), 0, 1 )

assign_start_lower_upper_values_cis()
cisplatin_mir4865p_fit.1component = model_ic50_and_stdev.1component(data2)
cisplatin_mir4865p_fit.2component = model_ic50_and_stdev.2component(data2)

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
cisplatin_mir4865p.1component_vs_2component.pvalue = pchisq(2*(cisplatin_mir4865p_fit.2component$model$value - cisplatin_mir4865p_fit.1component$model$value), degrees_of_freedom, lower.tail = FALSE)
cisplatin_mir4865p_fit.1component
cisplatin_mir4865p_fit.2component
cisplatin_mir4865p.1component_vs_2component.pvalue
cisplatin_mir4865p_fit.2component$IC50_ctl/cisplatin_mir4865p_fit.2component$IC50_case # fold change

> cisplatin_mir4865p_fit.1component
$IC50
[1] 3.981647

$IC50_stdev
[1] 0.08827386

$model
           A        B      scal      xmid    sigma    value fevals gevals niter convcode  kkt1  kkt2 xtime
L-BFGS-B 120 11.14164 0.4479457 0.6000627 3.640957 -146.404     77     77    NA        0 FALSE FALSE  0.02

> cisplatin_mir4865p_fit.2component
$IC50_ctl
[1] 4.392093

$IC50_case
[1] 3.631128

$IC50_ctl_stdev
[1] 0.6428745

$IC50_case_stdev
[1] 0.4787571

$model
           A        B      scal      xmid      xshift    sigma     value fevals gevals niter convcode  kkt1  kkt2 xtime
L-BFGS-B 120 11.09226 0.4476008 0.6426715 -0.08262998 3.287893 -140.8959     97     97    NA        0 FALSE FALSE  0.01

> cisplatin_mir4865p.1component_vs_2component.pvalue
[1] 0.0009032702
> cisplatin_mir4865p_fit.2component$IC50_ctl/cisplatin_mir4865p_fit.2component$IC50_case # fold change
[1] 1.209567

# Thus, there is a statistically significant difference between cisplatin-treated MSTO-211H cells when pretreated with miR-486-5p versus C81.
# p-value = 0.0009032702. C81 IC50 = 4.392093. miR-486-5p IC50 = 3.631128

A = cisplatin_mir4865p_fit.2component$model$A
B = cisplatin_mir4865p_fit.2component$model$B
scal = cisplatin_mir4865p_fit.2component$model$scal
xmid = cisplatin_mir4865p_fit.2component$model$xmid
xshift = cisplatin_mir4865p_fit.2component$model$xshift
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1a_cisplatin_mir4865p_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$mirna)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = cisplatin_mir4865p_fit.1component$model$A
B = cisplatin_mir4865p_fit.1component$model$B
scal = cisplatin_mir4865p_fit.1component$model$scal
xmid = cisplatin_mir4865p_fit.1component$model$xmid
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1a_cisplatin_mir4865p_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Which model is appropriate for miR-31-3p pretreatment before cisplatin treatment?
########## Does it have a lower TC50 than that of C81 pretreatment before cisplatin treatment?
########## Or should both treatments use the same model with the same IC50?
########## p-value is from chi-squared distribution

data2 = data1_cis[data1_cis$mirna %in% c("C81","miR-31-3p"),]
data2$is_ctl = ifelse( (data2$mirna=="C81"), 1, 0 )
data2$is_case = ifelse( (data2$mirna=="C81"), 0, 1 )

assign_start_lower_upper_values_cis()
cisplatin_mir313p_fit.1component = model_ic50_and_stdev.1component(data2)
cisplatin_mir313p_fit.2component = model_ic50_and_stdev.2component(data2)

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
cisplatin_mir313p.1component_vs_2component.pvalue = pchisq(2*(cisplatin_mir313p_fit.2component$model$value - cisplatin_mir313p_fit.1component$model$value), degrees_of_freedom, lower.tail = FALSE)
cisplatin_mir313p_fit.1component
cisplatin_mir313p_fit.2component
cisplatin_mir313p.1component_vs_2component.pvalue
cisplatin_mir313p_fit.2component$IC50_ctl/cisplatin_mir313p_fit.2component$IC50_case # fold change

> cisplatin_mir313p_fit.1component
$IC50
[1] 3.876282

$IC50_stdev
[1] 0.7427153

$model
           A       B      scal      xmid    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 120 6.28131 0.5894917 0.5884154 4.275757 -155.0822     79     79    NA        0 TRUE FALSE  0.02

> cisplatin_mir313p_fit.2component
$IC50_ctl
[1] 4.606151

$IC50_case
[1] 3.070458

$IC50_ctl_stdev
[1] 0.2125908

$IC50_case_stdev
[1] 0.2457102

$model
           A        B      scal      xmid    xshift    sigma    value fevals gevals niter convcode  kkt1  kkt2 xtime
L-BFGS-B 120 7.167565 0.5698804 0.6633381 -0.176135 3.114236 -137.255    113    113    NA        1 FALSE FALSE  0.03

> cisplatin_mir313p.1component_vs_2component.pvalue
[1] 2.356074e-09

> cisplatin_mir313p_fit.2component$IC50_ctl/cisplatin_mir313p_fit.2component$IC50_case # fold change
[1] 1.500151

# Thus, there is a statistically significant difference between cisplatin-treated MSTO-211H cells when pretreated with miR-31-3p versus C81.
# p-value = 2.356074e-09. C81 IC50 = 4.606151. miR-31-3p IC50 = 3.070458

A = cisplatin_mir313p_fit.2component$model$A
B = cisplatin_mir313p_fit.2component$model$B
scal = cisplatin_mir313p_fit.2component$model$scal
xmid = cisplatin_mir313p_fit.2component$model$xmid
xshift = cisplatin_mir313p_fit.2component$model$xshift
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1a_cisplatin_mir313p_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$mirna)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = cisplatin_mir313p_fit.1component$model$A
B = cisplatin_mir313p_fit.1component$model$B
scal = cisplatin_mir313p_fit.1component$model$scal
xmid = cisplatin_mir313p_fit.1component$model$xmid
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1a_cisplatin_mir313p_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Which model is appropriate for miR-31-5p pretreatment before cisplatin treatment?
########## Does it have a lower TC50 than that of C81 pretreatment before cisplatin treatment?
########## Or should both treatments use the same model with the same IC50?
########## p-value is from chi-squared distribution

data2 = data1_cis[data1_cis$mirna %in% c("C81","miR-31-5p"),]
data2$is_ctl = ifelse( (data2$mirna=="C81"), 1, 0 )
data2$is_case = ifelse( (data2$mirna=="C81"), 0, 1 )

assign_start_lower_upper_values_cis()
cisplatin_mir315p_fit.1component = model_ic50_and_stdev.1component(data2)
cisplatin_mir315p_fit.2component = model_ic50_and_stdev.2component(data2)

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
cisplatin_mir315p.1component_vs_2component.pvalue = pchisq(2*(cisplatin_mir315p_fit.2component$model$value - cisplatin_mir315p_fit.1component$model$value), degrees_of_freedom, lower.tail = FALSE)
cisplatin_mir315p_fit.1component
cisplatin_mir315p_fit.2component
cisplatin_mir315p.1component_vs_2component.pvalue
cisplatin_mir315p_fit.2component$IC50_ctl/cisplatin_mir315p_fit.2component$IC50_case # fold change

> cisplatin_mir315p_fit.1component
$IC50
[1] 4.210213

$IC50_stdev
[1] 0.0639326

$model
           A        B      scal     xmid    sigma     value fevals gevals niter convcode  kkt1  kkt2 xtime
L-BFGS-B 120 9.739057 0.4699175 0.624304 3.120465 -137.7259    120    120    NA        1 FALSE FALSE  0.02

> cisplatin_mir315p_fit.2component
$IC50_ctl
[1] 4.528227

$IC50_case
[1] 3.917691

$IC50_ctl_stdev
[1] 0.2536466

$IC50_case_stdev
[1] 0.1237555

$model
           A        B      scal      xmid      xshift    sigma     value fevals gevals niter convcode  kkt1  kkt2 xtime
L-BFGS-B 120 9.739188 0.4700041 0.6559282 -0.06289805 2.869129 -133.5396    100    100    NA        0 FALSE FALSE  0.03

> cisplatin_mir315p.1component_vs_2component.pvalue
[1] 0.003809572

> cisplatin_mir315p_fit.2component$IC50_ctl/cisplatin_mir315p_fit.2component$IC50_case # fold change
[1] 1.155841

# Thus, there is a statistically significant difference between cisplatin-treated MSTO-211H cells when pretreated with miR-31-5p versus C81.
# p-value = 0.003809572. C81 IC50 = 4.528227. miR-31-5p IC50 = 3.917691

A = cisplatin_mir315p_fit.2component$model$A
B = cisplatin_mir315p_fit.2component$model$B
scal = cisplatin_mir315p_fit.2component$model$scal
xmid = cisplatin_mir315p_fit.2component$model$xmid
xshift = cisplatin_mir315p_fit.2component$model$xshift
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1a_cisplatin_mir315p_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$mirna)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = cisplatin_mir315p_fit.1component$model$A
B = cisplatin_mir315p_fit.1component$model$B
scal = cisplatin_mir315p_fit.1component$model$scal
xmid = cisplatin_mir315p_fit.1component$model$xmid
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1a_cisplatin_mir315p_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Which model is appropriate for miR-145-3p pretreatment before cisplatin treatment?
########## Does it have a lower TC50 than that of C81 pretreatment before cisplatin treatment?
########## Or should both treatments use the same model with the same IC50?
########## p-value is from chi-squared distribution

data2 = data1_cis[data1_cis$mirna %in% c("C81","miR-145-3p"),]
data2$is_ctl = ifelse( (data2$mirna=="C81"), 1, 0 )
data2$is_case = ifelse( (data2$mirna=="C81"), 0, 1 )

assign_start_lower_upper_values_cis()
cisplatin_mir1453p_fit.1component = model_ic50_and_stdev.1component(data2)
cisplatin_mir1453p_fit.2component = model_ic50_and_stdev.2component(data2)

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
cisplatin_mir1453p.1component_vs_2component.pvalue = pchisq(2*(cisplatin_mir1453p_fit.2component$model$value - cisplatin_mir1453p_fit.1component$model$value), degrees_of_freedom, lower.tail = FALSE)
cisplatin_mir1453p_fit.1component
cisplatin_mir1453p_fit.2component
cisplatin_mir1453p.1component_vs_2component.pvalue
cisplatin_mir1453p_fit.2component$IC50_ctl/cisplatin_mir1453p_fit.2component$IC50_case # fold change

> cisplatin_mir1453p_fit.1component
$IC50
[1] 2.664439

$IC50_stdev
[1] 0.08695673

$model
           A        B      scal      xmid    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 120 5.798135 0.6607032 0.4256058 8.442232 -191.8175     78     78    NA        0 TRUE FALSE  0.02

> cisplatin_mir1453p_fit.2component
$IC50_ctl
[1] 4.273441

$IC50_case
[1] 1.354611

$IC50_ctl_stdev
[1] 0.09624589

$IC50_case_stdev
[1] 0.143841

$model
           A        B      scal      xmid     xshift    sigma     value fevals gevals niter convcode  kkt1  kkt2 xtime
L-BFGS-B 120 10.10668 0.5414088 0.6307777 -0.4989631 3.661453 -146.7075    111    111    NA        0 FALSE FALSE  0.03

> cisplatin_mir1453p.1component_vs_2component.pvalue
[1] 2.131063e-21

> cisplatin_mir1453p_fit.2component$IC50_ctl/cisplatin_mir1453p_fit.2component$IC50_case # fold change
[1] 3.154737

# Thus, there is a statistically significant difference between cisplatin-treated MSTO-211H cells when pretreated with miR-145-3p versus C81.
# p-value = 2.131063e-21. C81 IC50 = 4.273441. miR-145-3p IC50 = 1.354611

A = cisplatin_mir1453p_fit.2component$model$A
B = cisplatin_mir1453p_fit.2component$model$B
scal = cisplatin_mir1453p_fit.2component$model$scal
xmid = cisplatin_mir1453p_fit.2component$model$xmid
xshift = cisplatin_mir1453p_fit.2component$model$xshift
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1a_cisplatin_mir1453p_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$mirna)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = cisplatin_mir1453p_fit.1component$model$A
B = cisplatin_mir1453p_fit.1component$model$B
scal = cisplatin_mir1453p_fit.1component$model$scal
xmid = cisplatin_mir1453p_fit.1component$model$xmid
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1a_cisplatin_mir1453p_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Which model is appropriate for miR-145-5p pretreatment before cisplatin treatment?
########## Does it have a lower TC50 than that of C81 pretreatment before cisplatin treatment?
########## Or should both treatments use the same model with the same IC50?
########## p-value is from chi-squared distribution

data2 = data1_cis[data1_cis$mirna %in% c("C81","miR-145-5p"),]
data2$is_ctl = ifelse( (data2$mirna=="C81"), 1, 0 )
data2$is_case = ifelse( (data2$mirna=="C81"), 0, 1 )

assign_start_lower_upper_values_cis()
cisplatin_mir1455p_fit.1component = model_ic50_and_stdev.1component(data2)
cisplatin_mir1455p_fit.2component = model_ic50_and_stdev.2component(data2)

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
cisplatin_mir1455p.1component_vs_2component.pvalue = pchisq(2*(cisplatin_mir1455p_fit.2component$model$value - cisplatin_mir1455p_fit.1component$model$value), degrees_of_freedom, lower.tail = FALSE)
cisplatin_mir1455p_fit.1component
cisplatin_mir1455p_fit.2component
cisplatin_mir1455p.1component_vs_2component.pvalue
cisplatin_mir1455p_fit.2component$IC50_ctl/cisplatin_mir1455p_fit.2component$IC50_case # fold change

> cisplatin_mir1455p_fit.1component
$IC50
[1] 3.750341

$IC50_stdev
[1] 0.06105088

$model
           A        B      scal      xmid    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 120 8.551717 0.5050107 0.5740707 4.166709 -153.6876    108    108    NA        0 TRUE FALSE  0.03

> cisplatin_mir1455p_fit.2component
$IC50_ctl
[1] 4.979653

$IC50_case
[1] 3.289813

$IC50_ctl_stdev
[1] 0.11936

$IC50_case_stdev
[1] 0.109752

$model
                A        B      scal      xmid    xshift    sigma     value fevals gevals niter convcode  kkt1  kkt2 xtime
L-BFGS-B 117.2693 8.048086 0.5015726 0.6971991 -0.180028 3.424826 -132.3115    112    112    NA        1 FALSE FALSE  0.02

> cisplatin_mir1455p.1component_vs_2component.pvalue
[1] 6.21336e-11

> cisplatin_mir1455p_fit.2component$IC50_ctl/cisplatin_mir1455p_fit.2component$IC50_case # fold change
[1] 1.513659

# Thus, there is a statistically significant difference between cisplatin-treated MSTO-211H cells when pretreated with miR-145-5p versus C81.
# p-value = 6.21336e-11. C81 IC50 = 4.979653. miR-145-5p IC50 = 3.289813

A = cisplatin_mir1455p_fit.2component$model$A
B = cisplatin_mir1455p_fit.2component$model$B
scal = cisplatin_mir1455p_fit.2component$model$scal
xmid = cisplatin_mir1455p_fit.2component$model$xmid
xshift = cisplatin_mir1455p_fit.2component$model$xshift
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1a_cisplatin_mir1455p_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$mirna)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = cisplatin_mir1455p_fit.1component$model$A
B = cisplatin_mir1455p_fit.1component$model$B
scal = cisplatin_mir1455p_fit.1component$model$scal
xmid = cisplatin_mir1455p_fit.1component$model$xmid
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1a_cisplatin_mir1455p_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Which model is appropriate for miR-15a-5p pretreatment before cisplatin treatment?
########## Does it have a lower TC50 than that of C81 pretreatment before cisplatin treatment?
########## Or should both treatments use the same model with the same IC50?
########## p-value is from chi-squared distribution

data2 = data1_cis[data1_cis$mirna %in% c("C81","miR-15a-5p"),]
data2$is_ctl = ifelse( (data2$mirna=="C81"), 1, 0 )
data2$is_case = ifelse( (data2$mirna=="C81"), 0, 1 )

assign_start_lower_upper_values_cis()
cisplatin_mir15a5p_fit.1component = model_ic50_and_stdev.1component(data2)
cisplatin_mir15a5p_fit.2component = model_ic50_and_stdev.2component(data2)

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
cisplatin_mir15a5p.1component_vs_2component.pvalue = pchisq(2*(cisplatin_mir15a5p_fit.2component$model$value - cisplatin_mir15a5p_fit.1component$model$value), degrees_of_freedom, lower.tail = FALSE)
cisplatin_mir15a5p_fit.1component
cisplatin_mir15a5p_fit.2component
cisplatin_mir15a5p.1component_vs_2component.pvalue
cisplatin_mir15a5p_fit.2component$IC50_ctl/cisplatin_mir15a5p_fit.2component$IC50_case # fold change

> cisplatin_mir15a5p_fit.1component
$IC50
[1] 2.766294

$IC50_stdev
[1] 0.9523545

$model
           A        B      scal      xmid    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 120 5.286471 0.6721411 0.4418983 8.150431 -189.9185     88     88    NA        0 TRUE FALSE  0.02

> cisplatin_mir15a5p_fit.2component
$IC50_ctl
[1] 4.289035

$IC50_case
[1] 1.431274

$IC50_ctl_stdev
[1] 0.08174329

$IC50_case_stdev
[1] 0.2020581

$model
           A        B      scal      xmid     xshift    sigma     value fevals gevals niter convcode  kkt1  kkt2 xtime
L-BFGS-B 120 9.680018 0.5560906 0.6323596 -0.4766369 3.809092 -148.8418    106    106    NA        0 FALSE FALSE  0.01

> cisplatin_mir15a5p.1component_vs_2component.pvalue
[1] 1.259212e-19

> cisplatin_mir15a5p_fit.2component$IC50_ctl/cisplatin_mir15a5p_fit.2component$IC50_case # fold change
[1] 2.996656

# Thus, there is a statistically significant difference between cisplatin-treated MSTO-211H cells when pretreated with miR-15a-5p versus C81.
# p-value = 1.259212e-19. C81 IC50 = 4.289035. miR-15a-5p IC50 = 1.431274

A = cisplatin_mir15a5p_fit.2component$model$A
B = cisplatin_mir15a5p_fit.2component$model$B
scal = cisplatin_mir15a5p_fit.2component$model$scal
xmid = cisplatin_mir15a5p_fit.2component$model$xmid
xshift = cisplatin_mir15a5p_fit.2component$model$xshift
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1a_cisplatin_mir15a5p_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$mirna)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = cisplatin_mir15a5p_fit.1component$model$A
B = cisplatin_mir15a5p_fit.1component$model$B
scal = cisplatin_mir15a5p_fit.1component$model$scal
xmid = cisplatin_mir15a5p_fit.1component$model$xmid
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1a_cisplatin_mir15a5p_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Which model is appropriate for miR-16-5p pretreatment before cisplatin treatment?
########## Does it have a lower TC50 than that of C81 pretreatment before cisplatin treatment?
########## Or should both treatments use the same model with the same IC50?
########## p-value is from chi-squared distribution

data2 = data1_cis[data1_cis$mirna %in% c("C81","miR-16-5p"),]
data2$is_ctl = ifelse( (data2$mirna=="C81"), 1, 0 )
data2$is_case = ifelse( (data2$mirna=="C81"), 0, 1 )

assign_start_lower_upper_values_cis()
cisplatin_mir165p_fit.1component = model_ic50_and_stdev.1component(data2)
cisplatin_mir165p_fit.2component = model_ic50_and_stdev.2component(data2)

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
cisplatin_mir165p.1component_vs_2component.pvalue = pchisq(2*(cisplatin_mir165p_fit.2component$model$value - cisplatin_mir165p_fit.1component$model$value), degrees_of_freedom, lower.tail = FALSE)
cisplatin_mir165p_fit.1component
cisplatin_mir165p_fit.2component
cisplatin_mir165p.1component_vs_2component.pvalue
cisplatin_mir165p_fit.2component$IC50_ctl/cisplatin_mir165p_fit.2component$IC50_case # fold change

> cisplatin_mir165p_fit.1component
$IC50
[1] 2.270307

$IC50_stdev
[1] 1.199786

$model
           A        B      scal      xmid    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 120 2.938789 0.7729268 0.3560847 10.56309 -203.9259     79     79    NA        0 TRUE FALSE  0.02

> cisplatin_mir165p_fit.2component
$IC50_ctl
[1] 4.151424

$IC50_case
[1] 0.8626506

$IC50_ctl_stdev
[1] 1.349664

$IC50_case_stdev
[1] 0.1757212

$model
           A        B      scal      xmid     xshift    sigma     value fevals gevals niter convcode  kkt1  kkt2 xtime
L-BFGS-B 120 11.08718 0.5361252 0.6181971 -0.6823622 4.356328 -156.0371    112    112    NA        1 FALSE FALSE  0.04

> cisplatin_mir165p.1component_vs_2component.pvalue
[1] 1.285422e-22

> cisplatin_mir165p_fit.2component$IC50_ctl/cisplatin_mir165p_fit.2component$IC50_case # fold change
[1] 4.812405

# Thus, there is a statistically significant difference between cisplatin-treated MSTO-211H cells when pretreated with miR-16-5p versus C81.
# p-value = 1.285422e-22. C81 IC50 = 4.151424. miR-16-5p IC50 = 0.8626506

A = cisplatin_mir165p_fit.2component$model$A
B = cisplatin_mir165p_fit.2component$model$B
scal = cisplatin_mir165p_fit.2component$model$scal
xmid = cisplatin_mir165p_fit.2component$model$xmid
xshift = cisplatin_mir165p_fit.2component$model$xshift
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1a_cisplatin_mir165p_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$mirna)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = cisplatin_mir165p_fit.1component$model$A
B = cisplatin_mir165p_fit.1component$model$B
scal = cisplatin_mir165p_fit.1component$model$scal
xmid = cisplatin_mir165p_fit.1component$model$xmid
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1a_cisplatin_mir165p_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Which model is appropriate for miR-34a-5p pretreatment before cisplatin treatment?
########## Does it have a lower TC50 than that of C81 pretreatment before cisplatin treatment?
########## Or should both treatments use the same model with the same IC50?
########## p-value is from chi-squared distribution

data2 = data1_cis[data1_cis$mirna %in% c("C81","miR-34a-5p"),]
data2$is_ctl = ifelse( (data2$mirna=="C81"), 1, 0 )
data2$is_case = ifelse( (data2$mirna=="C81"), 0, 1 )

assign_start_lower_upper_values_cis()
cisplatin_mir34a5p_fit.1component = model_ic50_and_stdev.1component(data2)
cisplatin_mir34a5p_fit.2component = model_ic50_and_stdev.2component(data2)

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
cisplatin_mir34a5p.1component_vs_2component.pvalue = pchisq(2*(cisplatin_mir34a5p_fit.2component$model$value - cisplatin_mir34a5p_fit.1component$model$value), degrees_of_freedom, lower.tail = FALSE)
cisplatin_mir34a5p_fit.1component
cisplatin_mir34a5p_fit.2component
cisplatin_mir34a5p.1component_vs_2component.pvalue
cisplatin_mir34a5p_fit.2component$IC50_ctl/cisplatin_mir34a5p_fit.2component$IC50_case # fold change

> cisplatin_mir34a5p_fit.1component
$IC50
[1] 3.997075

$IC50_stdev
[1] 0.8643992

$model
           A        B      scal      xmid    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 120 6.944585 0.5588282 0.6017423 3.856158 -149.5049     81     81    NA        0 TRUE FALSE  0.01

> cisplatin_mir34a5p_fit.2component
$IC50_ctl
[1] 4.68571

$IC50_case
[1] 3.33357

$IC50_ctl_stdev
[1] 0.3724607

$IC50_case_stdev
[1] 0.1278499

$model
           A        B      scal      xmid     xshift    sigma     value fevals gevals niter convcode  kkt1  kkt2 xtime
L-BFGS-B 120 7.243779 0.5525429 0.6707754 -0.1478658 2.916808 -134.4325    114    114    NA        1 FALSE FALSE  0.02

> cisplatin_mir34a5p.1component_vs_2component.pvalue
[1] 4.009484e-08

> cisplatin_mir34a5p_fit.2component$IC50_ctl/cisplatin_mir34a5p_fit.2component$IC50_case # fold change
[1] 1.405613

# Thus, there is a statistically significant difference between cisplatin-treated MSTO-211H cells when pretreated with miR-34a-5p versus C81.
# p-value = 4.009484e-08. C81 IC50 = 4.68571. miR-34a-5p IC50 = 3.33357

A = cisplatin_mir34a5p_fit.2component$model$A
B = cisplatin_mir34a5p_fit.2component$model$B
scal = cisplatin_mir34a5p_fit.2component$model$scal
xmid = cisplatin_mir34a5p_fit.2component$model$xmid
xshift = cisplatin_mir34a5p_fit.2component$model$xshift
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1a_cisplatin_mir34a5p_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$mirna)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = cisplatin_mir34a5p_fit.1component$model$A
B = cisplatin_mir34a5p_fit.1component$model$B
scal = cisplatin_mir34a5p_fit.1component$model$scal
xmid = cisplatin_mir34a5p_fit.1component$model$xmid
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1a_cisplatin_mir34a5p_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Which model is appropriate for miR-34b-3p pretreatment before cisplatin treatment?
########## Does it have a lower TC50 than that of C81 pretreatment before cisplatin treatment?
########## Or should both treatments use the same model with the same IC50?
########## p-value is from chi-squared distribution

data2 = data1_cis[data1_cis$mirna %in% c("C81","miR-34b-3p"),]
data2$is_ctl = ifelse( (data2$mirna=="C81"), 1, 0 )
data2$is_case = ifelse( (data2$mirna=="C81"), 0, 1 )

assign_start_lower_upper_values_cis()
cisplatin_mir34b3p_fit.1component = model_ic50_and_stdev.1component(data2)
cisplatin_mir34b3p_fit.2component = model_ic50_and_stdev.2component(data2)

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
cisplatin_mir34b3p.1component_vs_2component.pvalue = pchisq(2*(cisplatin_mir34b3p_fit.2component$model$value - cisplatin_mir34b3p_fit.1component$model$value), degrees_of_freedom, lower.tail = FALSE)
cisplatin_mir34b3p_fit.1component
cisplatin_mir34b3p_fit.2component
cisplatin_mir34b3p.1component_vs_2component.pvalue
cisplatin_mir34b3p_fit.2component$IC50_ctl/cisplatin_mir34b3p_fit.2component$IC50_case # fold change

> cisplatin_mir34b3p_fit.1component
$IC50
[1] 2.831122

$IC50_stdev
[1] 1.534186

$model
           A        B      scal      xmid    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 120 3.207178 0.7293972 0.4519586 8.473458 -192.0182    113    113    NA        1 TRUE FALSE  0.01

> cisplatin_mir34b3p_fit.2component
$IC50_ctl
[1] 4.293577

$IC50_case
[1] 1.370131

$IC50_ctl_stdev
[1] 0.09874131

$IC50_case_stdev
[1] 0.2191403

$model
           A        B      scal      xmid    xshift    sigma     value fevals gevals niter convcode  kkt1  kkt2 xtime
L-BFGS-B 120 9.004366 0.5848791 0.6328192 -0.496057 4.432424 -157.0256     96     96    NA        0 FALSE FALSE  0.03

> cisplatin_mir34b3p.1component_vs_2component.pvalue
[1] 5.975151e-17

> cisplatin_mir34b3p_fit.2component$IC50_ctl/cisplatin_mir34b3p_fit.2component$IC50_case # fold change
[1] 3.133697

# Thus, there is a statistically significant difference between cisplatin-treated MSTO-211H cells when pretreated with miR-34b-3p versus C81.
# p-value = 5.975151e-17. C81 IC50 = 4.293577. miR-34b-3p IC50 = 1.370131

A = cisplatin_mir34b3p_fit.2component$model$A
B = cisplatin_mir34b3p_fit.2component$model$B
scal = cisplatin_mir34b3p_fit.2component$model$scal
xmid = cisplatin_mir34b3p_fit.2component$model$xmid
xshift = cisplatin_mir34b3p_fit.2component$model$xshift
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1a_cisplatin_mir34b3p_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$mirna)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = cisplatin_mir34b3p_fit.1component$model$A
B = cisplatin_mir34b3p_fit.1component$model$B
scal = cisplatin_mir34b3p_fit.1component$model$scal
xmid = cisplatin_mir34b3p_fit.1component$model$xmid
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1a_cisplatin_mir34b3p_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Statistical significance and inflexion point (IC50) and its standard deviation
########## Figure 1B

assign_start_lower_upper_values_gem = function()
{
	A_start = 100;          A_low = 30;              A_high = 120;
	B_start = 20;           B_low = -10;             B_high = 40;
	scal_start = 0.1;       scal_low = -Inf;         scal_high = Inf;
	xmid_start = 0;         xmid_low = -2;           xmid_high = 4;
	xshift_start = 0.1;     xshift_low = -1;         xshift_high = 2;
	sigma_start = 0.1;      sigma_low = 1e-4;        sigma_high = Inf;

	start.1component   = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   sigma=sigma_start)
	lower.1component   = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     sigma=sigma_low)
	upper.1component   = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    sigma=sigma_high)
	assign("start.1component", start.1component, envir = .GlobalEnv)
	assign("lower.1component", lower.1component, envir = .GlobalEnv)
	assign("upper.1component", upper.1component, envir = .GlobalEnv)
	assign("start2.1component", start2.1component, envir = .GlobalEnv)

	start.2component = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   xshift=xshift_start,   sigma=sigma_start)
	lower.2component = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     xshift=xshift_low,     sigma=sigma_low)
	upper.2component = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    xshift=xshift_high,    sigma=sigma_high)
	assign("start.2component", start.2component, envir = .GlobalEnv)
	assign("lower.2component", lower.2component, envir = .GlobalEnv)
	assign("upper.2component", upper.2component, envir = .GlobalEnv)
}
assign_start_lower_upper_values_gem()


########## Which model is appropriate for miR-486-5p pretreatment before gemcitabine treatment?
########## Does it have a lower TC50 than that of C81 pretreatment before gemcitabine treatment?
########## Or should both treatments use the same model with the same IC50?
########## p-value is from chi-squared distribution

data2 = data1_gem[data1_gem$mirna %in% c("C81","miR-486-5p"),]
data2$is_ctl = ifelse( (data2$mirna=="C81"), 1, 0 )
data2$is_case = ifelse( (data2$mirna=="C81"), 0, 1 )

assign_start_lower_upper_values_gem()
gemcitabine_mir4865p_fit.1component = model_ic50_and_stdev.1component(data2)
gemcitabine_mir4865p_fit.2component = model_ic50_and_stdev.2component(data2)

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
gemcitabine_mir4865p.1component_vs_2component.pvalue = pchisq(2*(gemcitabine_mir4865p_fit.2component$model$value - gemcitabine_mir4865p_fit.1component$model$value), degrees_of_freedom, lower.tail = FALSE)
gemcitabine_mir4865p_fit.1component
gemcitabine_mir4865p_fit.2component
gemcitabine_mir4865p.1component_vs_2component.pvalue
gemcitabine_mir4865p_fit.2component$IC50_ctl/gemcitabine_mir4865p_fit.2component$IC50_case # fold change

> gemcitabine_mir4865p_fit.1component
$IC50
[1] 0.2581335

$IC50_stdev
[1] 0.007868214

$model
               A        B      scal       xmid    sigma   value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 92.9658 13.66242 0.1079971 -0.5881556 5.760605 -171.15    105    105    NA        0 TRUE FALSE  0.01

> gemcitabine_mir4865p_fit.2component
$IC50_ctl
[1] 0.2512814

$IC50_case
[1] 0.2647759

$IC50_ctl_stdev
[1] 0.03941106

$IC50_case_stdev
[1] 0.01418507

$model
                A        B      scal       xmid     xshift    sigma     value fevals gevals niter convcode  kkt1  kkt2 xtime
L-BFGS-B 92.90087 13.71549 0.1054175 -0.5998396 0.02271808 5.735422 -170.6706    117    117    NA        1 FALSE FALSE  0.03

> gemcitabine_mir4865p.1component_vs_2component.pvalue
[1] 0.3275098

> gemcitabine_mir4865p_fit.2component$IC50_ctl/gemcitabine_mir4865p_fit.2component$IC50_case # fold change
[1] 0.9490343

# Thus, there is not a statistically significant difference between gemcitabine-treated MSTO-211H cells when pretreated with miR-486-5p versus C81.
# p-value = 0.3275098. C81 and miR-486-5p IC50 = 0.2581335

A = gemcitabine_mir4865p_fit.2component$model$A
B = gemcitabine_mir4865p_fit.2component$model$B
scal = gemcitabine_mir4865p_fit.2component$model$scal
xmid = gemcitabine_mir4865p_fit.2component$model$xmid
xshift = gemcitabine_mir4865p_fit.2component$model$xshift
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1b_gemcitabine_mir4865p_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$mirna)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = gemcitabine_mir4865p_fit.1component$model$A
B = gemcitabine_mir4865p_fit.1component$model$B
scal = gemcitabine_mir4865p_fit.1component$model$scal
xmid = gemcitabine_mir4865p_fit.1component$model$xmid
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1b_gemcitabine_mir4865p_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Which model is appropriate for miR-31-3p pretreatment before gemcitabine treatment?
########## Does it have a lower TC50 than that of C81 pretreatment before gemcitabine treatment?
########## Or should both treatments use the same model with the same IC50?
########## p-value is from chi-squared distribution

data2 = data1_gem[data1_gem$mirna %in% c("C81","miR-31-3p"),]
data2$is_ctl = ifelse( (data2$mirna=="C81"), 1, 0 )
data2$is_case = ifelse( (data2$mirna=="C81"), 0, 1 )

assign_start_lower_upper_values_gem()
gemcitabine_mir313p_fit.1component = model_ic50_and_stdev.1component(data2)
gemcitabine_mir313p_fit.2component = model_ic50_and_stdev.2component(data2)

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
gemcitabine_mir313p.1component_vs_2component.pvalue = pchisq(2*(gemcitabine_mir313p_fit.2component$model$value - gemcitabine_mir313p_fit.1component$model$value), degrees_of_freedom, lower.tail = FALSE)
gemcitabine_mir313p_fit.1component
gemcitabine_mir313p_fit.2component
gemcitabine_mir313p.1component_vs_2component.pvalue
gemcitabine_mir313p_fit.2component$IC50_ctl/gemcitabine_mir313p_fit.2component$IC50_case # fold change

> gemcitabine_mir313p_fit.1component
$IC50
[1] 0.2542899

$IC50_stdev
[1] 0.0175736

$model
               A        B     scal       xmid    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 89.6012 18.77767 0.129111 -0.5946709 6.901384 -180.9356     80     80    NA        0 TRUE FALSE  0.02

> gemcitabine_mir313p_fit.2component
$IC50_ctl
[1] 0.2471954

$IC50_case
[1] 0.2659476

$IC50_ctl_stdev
[1] 0.04324754

$IC50_case_stdev
[1] 0.03046747

$model
                A        B      scal       xmid     xshift    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 89.33388 18.79469 0.1252542 -0.6069596 0.03175569 6.855878 -180.5777    105    105    NA        0 TRUE FALSE  0.01

> gemcitabine_mir313p.1component_vs_2component.pvalue
[1] 0.3975159

> gemcitabine_mir313p_fit.2component$IC50_ctl/gemcitabine_mir313p_fit.2component$IC50_case # fold change
[1] 0.9294891

# Thus, there is not a statistically significant difference between gemcitabine-treated MSTO-211H cells when pretreated with miR-31-3p versus C81.
# p-value = 0.3975159. C81 and miR-486-5p IC50 = 0.2542899

A = gemcitabine_mir313p_fit.2component$model$A
B = gemcitabine_mir313p_fit.2component$model$B
scal = gemcitabine_mir313p_fit.2component$model$scal
xmid = gemcitabine_mir313p_fit.2component$model$xmid
xshift = gemcitabine_mir313p_fit.2component$model$xshift
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1b_gemcitabine_mir313p_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$mirna)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = gemcitabine_mir313p_fit.1component$model$A
B = gemcitabine_mir313p_fit.1component$model$B
scal = gemcitabine_mir313p_fit.1component$model$scal
xmid = gemcitabine_mir313p_fit.1component$model$xmid
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1b_gemcitabine_mir313p_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Which model is appropriate for miR-31-5p pretreatment before gemcitabine treatment?
########## Does it have a lower TC50 than that of C81 pretreatment before gemcitabine treatment?
########## Or should both treatments use the same model with the same IC50?
########## p-value is from chi-squared distribution

data2 = data1_gem[data1_gem$mirna %in% c("C81","miR-31-5p"),]
data2$is_ctl = ifelse( (data2$mirna=="C81"), 1, 0 )
data2$is_case = ifelse( (data2$mirna=="C81"), 0, 1 )

assign_start_lower_upper_values_gem()
gemcitabine_mir315p_fit.1component = model_ic50_and_stdev.1component(data2)
gemcitabine_mir315p_fit.2component = model_ic50_and_stdev.2component(data2)

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
gemcitabine_mir315p.1component_vs_2component.pvalue = pchisq(2*(gemcitabine_mir315p_fit.2component$model$value - gemcitabine_mir315p_fit.1component$model$value), degrees_of_freedom, lower.tail = FALSE)
gemcitabine_mir315p_fit.1component
gemcitabine_mir315p_fit.2component
gemcitabine_mir315p.1component_vs_2component.pvalue
gemcitabine_mir315p_fit.2component$IC50_ctl/gemcitabine_mir315p_fit.2component$IC50_case # fold change

> gemcitabine_mir315p_fit.1component
$IC50
[1] 0.2616801

$IC50_stdev
[1] 0.004120108

$model
                A       B       scal       xmid    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 94.60677 15.8742 0.09691226 -0.5822293 5.972002 -173.1254    100    100    NA        0 TRUE FALSE  0.02

> gemcitabine_mir315p_fit.2component
$IC50_ctl
[1] 0.2437244

$IC50_case
[1] 0.2797449

$IC50_ctl_stdev
[1] 0.05064217

$IC50_case_stdev
[1] 0.02505685

$model
                A        B       scal       xmid     xshift    sigma    value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 94.70114 15.86748 0.09698317 -0.6131011 0.05986322 5.607609 -169.716    107    107    NA        0 TRUE FALSE  0.02

> gemcitabine_mir315p.1component_vs_2component.pvalue
[1] 0.009020898

> gemcitabine_mir315p_fit.2component$IC50_ctl/gemcitabine_mir315p_fit.2component$IC50_case # fold change
[1] 0.8712379

# Thus, there is a statistically significant difference between gemcitabine-treated MSTO-211H cells when pretreated with miR-31-5p versus C81.
# p-value = 0.009020898. C81 IC50 = 0.2437244. miR-31-5p IC50 = 0.2797449

A = gemcitabine_mir315p_fit.2component$model$A
B = gemcitabine_mir315p_fit.2component$model$B
scal = gemcitabine_mir315p_fit.2component$model$scal
xmid = gemcitabine_mir315p_fit.2component$model$xmid
xshift = gemcitabine_mir315p_fit.2component$model$xshift
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1b_gemcitabine_mir315p_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$mirna)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = gemcitabine_mir315p_fit.1component$model$A
B = gemcitabine_mir315p_fit.1component$model$B
scal = gemcitabine_mir315p_fit.1component$model$scal
xmid = gemcitabine_mir315p_fit.1component$model$xmid
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1b_gemcitabine_mir315p_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Which model is appropriate for miR-145-3p pretreatment before gemcitabine treatment?
########## Does it have a lower TC50 than that of C81 pretreatment before gemcitabine treatment?
########## Or should both treatments use the same model with the same IC50?
########## p-value is from chi-squared distribution

data2 = data1_gem[data1_gem$mirna %in% c("C81","miR-145-3p"),]
data2$is_ctl = ifelse( (data2$mirna=="C81"), 1, 0 )
data2$is_case = ifelse( (data2$mirna=="C81"), 0, 1 )

assign_start_lower_upper_values_gem()
gemcitabine_mir1453p_fit.1component = model_ic50_and_stdev.1component(data2)
gemcitabine_mir1453p_fit.2component = model_ic50_and_stdev.2component(data2)

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
gemcitabine_mir1453p.1component_vs_2component.pvalue = pchisq(2*(gemcitabine_mir1453p_fit.2component$model$value - gemcitabine_mir1453p_fit.1component$model$value), degrees_of_freedom, lower.tail = FALSE)
gemcitabine_mir1453p_fit.1component
gemcitabine_mir1453p_fit.2component
gemcitabine_mir1453p.1component_vs_2component.pvalue
gemcitabine_mir1453p_fit.2component$IC50_ctl/gemcitabine_mir1453p_fit.2component$IC50_case # fold change

> gemcitabine_mir1453p_fit.1component
$IC50
[1] 0.2476017

$IC50_stdev
[1] 0.01068086

$model
                A        B      scal       xmid    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 82.74997 14.59666 0.1090973 -0.6062463 8.488197 -192.1197     57     57    NA        0 TRUE FALSE     0

> gemcitabine_mir1453p_fit.2component
$IC50_ctl
[1] 0.2745504

$IC50_case
[1] 0.2063582

$IC50_ctl_stdev
[1] 0.02961699

$IC50_case_stdev
[1] 0.04792482

$model
                A        B      scal       xmid     xshift    sigma     value fevals gevals niter convcode  kkt1  kkt2 xtime
L-BFGS-B 84.61225 13.84793 0.1358068 -0.5613779 -0.1240004 8.264122 -189.1677    112    112    NA        1 FALSE FALSE  0.01

> gemcitabine_mir1453p.1component_vs_2component.pvalue
[1] 0.01510625

> gemcitabine_mir1453p_fit.2component$IC50_ctl/gemcitabine_mir1453p_fit.2component$IC50_case # fold change
[1] 1.330455

# Thus, there is a statistically significant difference between gemcitabine-treated MSTO-211H cells when pretreated with miR-145-3p versus C81.
# p-value = 0.01510625. C81 IC50 = 0.2745504. miR-145-3p IC50 = 0.2063582

A = gemcitabine_mir1453p_fit.2component$model$A
B = gemcitabine_mir1453p_fit.2component$model$B
scal = gemcitabine_mir1453p_fit.2component$model$scal
xmid = gemcitabine_mir1453p_fit.2component$model$xmid
xshift = gemcitabine_mir1453p_fit.2component$model$xshift
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1b_gemcitabine_mir1453p_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$mirna)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = gemcitabine_mir1453p_fit.1component$model$A
B = gemcitabine_mir1453p_fit.1component$model$B
scal = gemcitabine_mir1453p_fit.1component$model$scal
xmid = gemcitabine_mir1453p_fit.1component$model$xmid
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1b_gemcitabine_mir1453p_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Which model is appropriate for miR-145-5p pretreatment before gemcitabine treatment?
########## Does it have a lower TC50 than that of C81 pretreatment before gemcitabine treatment?
########## Or should both treatments use the same model with the same IC50?
########## p-value is from chi-squared distribution

data2 = data1_gem[data1_gem$mirna %in% c("C81","miR-145-5p"),]
data2$is_ctl = ifelse( (data2$mirna=="C81"), 1, 0 )
data2$is_case = ifelse( (data2$mirna=="C81"), 0, 1 )

assign_start_lower_upper_values_gem()
gemcitabine_mir1455p_fit.1component = model_ic50_and_stdev.1component(data2)
gemcitabine_mir1455p_fit.2component = model_ic50_and_stdev.2component(data2)

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
gemcitabine_mir1455p.1component_vs_2component.pvalue = pchisq(2*(gemcitabine_mir1455p_fit.2component$model$value - gemcitabine_mir1455p_fit.1component$model$value), degrees_of_freedom, lower.tail = FALSE)
gemcitabine_mir1455p_fit.1component
gemcitabine_mir1455p_fit.2component
gemcitabine_mir1455p.1component_vs_2component.pvalue
gemcitabine_mir1455p_fit.2component$IC50_ctl/gemcitabine_mir1455p_fit.2component$IC50_case # fold change

> gemcitabine_mir1455p_fit.1component
$IC50
[1] 0.2517124

$IC50_stdev
[1] 0.01718737

$model
                A        B      scal       xmid    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 90.87641 14.14649 0.1006157 -0.5990953 5.870627 -172.2003     90     90    NA        0 TRUE FALSE  0.02

> gemcitabine_mir1455p_fit.2component
$IC50_ctl
[1] 0.256152

$IC50_case
[1] 0.2509323

$IC50_ctl_stdev
[1] 0.03537425

$IC50_case_stdev
[1] 0.01369153

$model
                A        B      scal       xmid      xshift    sigma    value fevals gevals niter convcode  kkt1  kkt2 xtime
L-BFGS-B 90.72884 13.59224 0.1034486 -0.5915022 -0.00894125 5.979221 -172.272    115    115    NA        1 FALSE FALSE  0.03

> gemcitabine_mir1455p.1component_vs_2component.pvalue
[1] 1

> gemcitabine_mir1455p_fit.2component$IC50_ctl/gemcitabine_mir1455p_fit.2component$IC50_case # fold change
[1] 1.020801

# Thus, there is not a statistically significant difference between gemcitabine-treated MSTO-211H cells when pretreated with miR-145-5p versus C81.
# p-value = 1. C81 and miR-145-5p IC50 = 0.2517124

A = gemcitabine_mir1455p_fit.2component$model$A
B = gemcitabine_mir1455p_fit.2component$model$B
scal = gemcitabine_mir1455p_fit.2component$model$scal
xmid = gemcitabine_mir1455p_fit.2component$model$xmid
xshift = gemcitabine_mir1455p_fit.2component$model$xshift
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1b_gemcitabine_mir1455p_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$mirna)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = gemcitabine_mir1455p_fit.1component$model$A
B = gemcitabine_mir1455p_fit.1component$model$B
scal = gemcitabine_mir1455p_fit.1component$model$scal
xmid = gemcitabine_mir1455p_fit.1component$model$xmid
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1b_gemcitabine_mir1455p_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Which model is appropriate for miR-15a-5p pretreatment before gemcitabine treatment?
########## Does it have a lower TC50 than that of C81 pretreatment before gemcitabine treatment?
########## Or should both treatments use the same model with the same IC50?
########## p-value is from chi-squared distribution

data2 = data1_gem[data1_gem$mirna %in% c("C81","miR-15a-5p"),]
data2$is_ctl = ifelse( (data2$mirna=="C81"), 1, 0 )
data2$is_case = ifelse( (data2$mirna=="C81"), 0, 1 )

assign_start_lower_upper_values_gem()
gemcitabine_mir15a5p_fit.1component = model_ic50_and_stdev.1component(data2)
gemcitabine_mir15a5p_fit.2component = model_ic50_and_stdev.2component(data2)

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
gemcitabine_mir15a5p.1component_vs_2component.pvalue = pchisq(2*(gemcitabine_mir15a5p_fit.2component$model$value - gemcitabine_mir15a5p_fit.1component$model$value), degrees_of_freedom, lower.tail = FALSE)
gemcitabine_mir15a5p_fit.1component
gemcitabine_mir15a5p_fit.2component
gemcitabine_mir15a5p.1component_vs_2component.pvalue
gemcitabine_mir15a5p_fit.2component$IC50_ctl/gemcitabine_mir15a5p_fit.2component$IC50_case # fold change

> gemcitabine_mir15a5p_fit.1component
$IC50
[1] 0.1893729

$IC50_stdev
[1] 0.02342984

$model
                A        B      scal       xmid    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 96.84557 17.17085 0.1775578 -0.7226821 7.854793 -187.9443     72     72    NA        0 TRUE FALSE  0.01

> gemcitabine_mir15a5p_fit.2component
$IC50_ctl
[1] 0.2269653

$IC50_case
[1] 0.1475646

$IC50_ctl_stdev
[1] 0.04966959

$IC50_case_stdev
[1] 0.01983192

$model
                A        B      scal       xmid     xshift   sigma     value fevals gevals niter convcode  kkt1  kkt2 xtime
L-BFGS-B 97.56855 17.36501 0.1604786 -0.6440405 -0.1869773 6.39565 -178.1863    113    113    NA        1 FALSE FALSE  0.03

> gemcitabine_mir15a5p.1component_vs_2component.pvalue
[1] 9.975896e-06 

> gemcitabine_mir15a5p_fit.2component$IC50_ctl/gemcitabine_mir15a5p_fit.2component$IC50_case # fold change
[1] 1.538074

# Thus, there is a statistically significant difference between gemcitabine-treated MSTO-211H cells when pretreated with miR-15a-5p versus C81.
# p-value = 9.975896e-06. C81 IC50 = 0.2269653. miR-15a-5p IC50 = 0.1475646

A = gemcitabine_mir15a5p_fit.2component$model$A
B = gemcitabine_mir15a5p_fit.2component$model$B
scal = gemcitabine_mir15a5p_fit.2component$model$scal
xmid = gemcitabine_mir15a5p_fit.2component$model$xmid
xshift = gemcitabine_mir15a5p_fit.2component$model$xshift
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1b_gemcitabine_mir15a5p_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$mirna)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = gemcitabine_mir15a5p_fit.1component$model$A
B = gemcitabine_mir15a5p_fit.1component$model$B
scal = gemcitabine_mir15a5p_fit.1component$model$scal
xmid = gemcitabine_mir15a5p_fit.1component$model$xmid
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1b_gemcitabine_mir15a5p_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Which model is appropriate for miR-16-5p pretreatment before gemcitabine treatment?
########## Does it have a lower TC50 than that of C81 pretreatment before gemcitabine treatment?
########## Or should both treatments use the same model with the same IC50?
########## p-value is from chi-squared distribution

data2 = data1_gem[data1_gem$mirna %in% c("C81","miR-16-5p"),]
data2$is_ctl = ifelse( (data2$mirna=="C81"), 1, 0 )
data2$is_case = ifelse( (data2$mirna=="C81"), 0, 1 )

assign_start_lower_upper_values_gem()
gemcitabine_mir165p_fit.1component = model_ic50_and_stdev.1component(data2)
gemcitabine_mir165p_fit.2component = model_ic50_and_stdev.2component(data2)

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
gemcitabine_mir165p.1component_vs_2component.pvalue = pchisq(2*(gemcitabine_mir165p_fit.2component$model$value - gemcitabine_mir165p_fit.1component$model$value), degrees_of_freedom, lower.tail = FALSE)
gemcitabine_mir165p_fit.1component
gemcitabine_mir165p_fit.2component
gemcitabine_mir165p.1component_vs_2component.pvalue
gemcitabine_mir165p_fit.2component$IC50_ctl/gemcitabine_mir165p_fit.2component$IC50_case # fold change

> gemcitabine_mir165p_fit.1component
$IC50
[1] 0.1327154

$IC50_stdev
[1] 0.02617753

$model
                A        B      scal       xmid    sigma     value fevals gevals niter convcode  kkt1  kkt2 xtime
L-BFGS-B 103.2984 14.02005 0.2597972 -0.8770787 12.09879 -211.2786    115    115    NA        1 FALSE FALSE  0.03

> gemcitabine_mir165p_fit.2component
$IC50_ctl
[1] 0.2389575

$IC50_case
[1] 0.08714143

$IC50_ctl_stdev
[1] 0.04214758

$IC50_case_stdev
[1] 0.0004506421

$model
                A        B      scal       xmid    xshift    sigma     value fevals gevals niter convcode  kkt1  kkt2 xtime
L-BFGS-B 95.13805 16.21717 0.1250873 -0.6216793 -0.438096 6.189317 -175.2453    119    119    NA        1 FALSE FALSE  0.01

> gemcitabine_mir165p.1component_vs_2component.pvalue
[1] 2.080689e-17

> gemcitabine_mir165p_fit.2component$IC50_ctl/gemcitabine_mir165p_fit.2component$IC50_case # fold change
[1] 2.74218

# Thus, there is a statistically significant difference between gemcitabine-treated MSTO-211H cells when pretreated with miR-16-5p versus C81.
# p-value = 2.080689e-17. C81 IC50 = 0.2389575. miR-16-5p IC50 = 0.08714143

A = gemcitabine_mir165p_fit.2component$model$A
B = gemcitabine_mir165p_fit.2component$model$B
scal = gemcitabine_mir165p_fit.2component$model$scal
xmid = gemcitabine_mir165p_fit.2component$model$xmid
xshift = gemcitabine_mir165p_fit.2component$model$xshift
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1b_gemcitabine_mir165p_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$mirna)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = gemcitabine_mir165p_fit.1component$model$A
B = gemcitabine_mir165p_fit.1component$model$B
scal = gemcitabine_mir165p_fit.1component$model$scal
xmid = gemcitabine_mir165p_fit.1component$model$xmid
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1b_gemcitabine_mir165p_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Which model is appropriate for miR-34a-5p pretreatment before gemcitabine treatment?
########## Does it have a lower TC50 than that of C81 pretreatment before gemcitabine treatment?
########## Or should both treatments use the same model with the same IC50?
########## p-value is from chi-squared distribution

data2 = data1_gem[data1_gem$mirna %in% c("C81","miR-34a-5p"),]
data2$is_ctl = ifelse( (data2$mirna=="C81"), 1, 0 )
data2$is_case = ifelse( (data2$mirna=="C81"), 0, 1 )

assign_start_lower_upper_values_gem()
gemcitabine_mir34a5p_fit.1component = model_ic50_and_stdev.1component(data2)
gemcitabine_mir34a5p_fit.2component = model_ic50_and_stdev.2component(data2)

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
gemcitabine_mir34a5p.1component_vs_2component.pvalue = pchisq(2*(gemcitabine_mir34a5p_fit.2component$model$value - gemcitabine_mir34a5p_fit.1component$model$value), degrees_of_freedom, lower.tail = FALSE)
gemcitabine_mir34a5p_fit.1component
gemcitabine_mir34a5p_fit.2component
gemcitabine_mir34a5p.1component_vs_2component.pvalue
gemcitabine_mir34a5p_fit.2component$IC50_ctl/gemcitabine_mir34a5p_fit.2component$IC50_case # fold change

> gemcitabine_mir34a5p_fit.1component
$IC50
[1] 0.1507153

$IC50_stdev
[1] 0.02646985

$model
                A        B      scal       xmid    sigma    value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 111.7842 14.15986 0.2319732 -0.8218427 10.22838 -202.182     75     75    NA        0 TRUE FALSE  0.02

> gemcitabine_mir34a5p_fit.2component
$IC50_ctl
[1] 0.2176737

$IC50_case
[1] 0.1246011

$IC50_ctl_stdev
[1] 0.0822867

$IC50_case_stdev
[1] 0.004825442

$model
               A       B      scal       xmid     xshift    sigma     value fevals gevals niter convcode  kkt1  kkt2 xtime
L-BFGS-B 102.693 16.2681 0.1412041 -0.6621941 -0.2422841 8.438427 -194.2869    178    178    NA        1 FALSE FALSE  0.05

> gemcitabine_mir34a5p.1component_vs_2component.pvalue
[1] 7.077359e-05

> gemcitabine_mir34a5p_fit.2component$IC50_ctl/gemcitabine_mir34a5p_fit.2component$IC50_case # fold change
[1] 1.746965

# Thus, there is a statistically significant difference between gemcitabine-treated MSTO-211H cells when pretreated with miR-34a-5p versus C81.
# p-value = 7.077359e-05. C81 IC50 = 0.2176737. miR-34a-5p IC50 = 0.1246011

A = gemcitabine_mir34a5p_fit.2component$model$A
B = gemcitabine_mir34a5p_fit.2component$model$B
scal = gemcitabine_mir34a5p_fit.2component$model$scal
xmid = gemcitabine_mir34a5p_fit.2component$model$xmid
xshift = gemcitabine_mir34a5p_fit.2component$model$xshift
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1b_gemcitabine_mir34a5p_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$mirna)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = gemcitabine_mir34a5p_fit.1component$model$A
B = gemcitabine_mir34a5p_fit.1component$model$B
scal = gemcitabine_mir34a5p_fit.1component$model$scal
xmid = gemcitabine_mir34a5p_fit.1component$model$xmid
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1b_gemcitabine_mir34a5p_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Which model is appropriate for miR-34b-3p pretreatment before gemcitabine treatment?
########## Does it have a lower TC50 than that of C81 pretreatment before gemcitabine treatment?
########## Or should both treatments use the same model with the same IC50?
########## p-value is from chi-squared distribution

data2 = data1_gem[data1_gem$mirna %in% c("C81","miR-34b-3p"),]
data2$is_ctl = ifelse( (data2$mirna=="C81"), 1, 0 )
data2$is_case = ifelse( (data2$mirna=="C81"), 0, 1 )

assign_start_lower_upper_values_gem()
gemcitabine_mir34b3p_fit.1component = model_ic50_and_stdev.1component(data2)
gemcitabine_mir34b3p_fit.2component = model_ic50_and_stdev.2component(data2)

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
gemcitabine_mir34b3p.1component_vs_2component.pvalue = pchisq(2*(gemcitabine_mir34b3p_fit.2component$model$value - gemcitabine_mir34b3p_fit.1component$model$value), degrees_of_freedom, lower.tail = FALSE)
gemcitabine_mir34b3p_fit.1component
gemcitabine_mir34b3p_fit.2component
gemcitabine_mir34b3p.1component_vs_2component.pvalue
gemcitabine_mir34b3p_fit.2component$IC50_ctl/gemcitabine_mir34b3p_fit.2component$IC50_case # fold change

> gemcitabine_mir34b3p_fit.1component
$IC50
[1] 0.1641117

$IC50_stdev
[1] 0.01944176

$model
                A        B      scal       xmid    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 99.56673 14.06771 0.2314338 -0.7848604 11.30369 -207.5797     40     40    NA        0 TRUE FALSE  0.01

> gemcitabine_mir34b3p_fit.2component
$IC50_ctl
[1] 0.2477442

$IC50_case
[1] 0.1106387

$IC50_ctl_stdev
[1] 0.04194951

$IC50_case_stdev
[1] 0.01446887

$model
                A        B       scal       xmid     xshift   sigma     value fevals gevals niter convcode  kkt1  kkt2 xtime
L-BFGS-B 92.31065 18.29536 0.04670897 -0.6059966 -0.3500962 7.94417 -188.5658    119    119    NA        1 FALSE FALSE  0.03

> gemcitabine_mir34b3p.1component_vs_2component.pvalue
[1] 6.974572e-10

> gemcitabine_mir34b3p_fit.2component$IC50_ctl/gemcitabine_mir34b3p_fit.2component$IC50_case # fold change
[1] 2.239217

# Thus, there is a statistically significant difference between gemcitabine-treated MSTO-211H cells when pretreated with miR-34b-3p versus C81.
# p-value = 6.974572e-10. C81 IC50 = 0.2477442. miR-34b-3p IC50 = 0.1106387

A = gemcitabine_mir34b3p_fit.2component$model$A
B = gemcitabine_mir34b3p_fit.2component$model$B
scal = gemcitabine_mir34b3p_fit.2component$model$scal
xmid = gemcitabine_mir34b3p_fit.2component$model$xmid
xshift = gemcitabine_mir34b3p_fit.2component$model$xshift
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1b_gemcitabine_mir34b3p_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$mirna)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = gemcitabine_mir34b3p_fit.1component$model$A
B = gemcitabine_mir34b3p_fit.1component$model$B
scal = gemcitabine_mir34b3p_fit.1component$model$scal
xmid = gemcitabine_mir34b3p_fit.1component$model$xmid
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1b_gemcitabine_mir34b3p_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Statistical significance and inflexion point (IC50) and its standard deviation
########## Figure 1C

assign_start_lower_upper_values_ym155 = function()
{
	A_start = 100;          A_low = 30;              A_high = 120;
	B_start = 20;           B_low = -10;             B_high = 40;
	scal_start = 0.1;       scal_low = -Inf;         scal_high = Inf;
	xmid_start = 0;         xmid_low = -2;           xmid_high = 4;
	xshift_start = 0.1;     xshift_low = -1;         xshift_high = 2;
	sigma_start = 0.1;      sigma_low = 1e-4;        sigma_high = Inf;

	start.1component   = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   sigma=sigma_start)
	lower.1component   = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     sigma=sigma_low)
	upper.1component   = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    sigma=sigma_high)
	assign("start.1component", start.1component, envir = .GlobalEnv)
	assign("lower.1component", lower.1component, envir = .GlobalEnv)
	assign("upper.1component", upper.1component, envir = .GlobalEnv)
	assign("start2.1component", start2.1component, envir = .GlobalEnv)

	start.2component = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   xshift=xshift_start,   sigma=sigma_start)
	lower.2component = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     xshift=xshift_low,     sigma=sigma_low)
	upper.2component = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    xshift=xshift_high,    sigma=sigma_high)
	assign("start.2component", start.2component, envir = .GlobalEnv)
	assign("lower.2component", lower.2component, envir = .GlobalEnv)
	assign("upper.2component", upper.2component, envir = .GlobalEnv)
}
assign_start_lower_upper_values_ym155()


########## Which model is appropriate for miR-222-3p pretreatment before YM155 treatment?
########## Does it have a lower TC50 than that of C81 pretreatment before YM155 treatment?
########## Or should both treatments use the same model with the same IC50?
########## p-value is from chi-squared distribution

data2 = data1_ym155[data1_ym155$mirna %in% c("C81","miR-222-3p"),]
data2$is_ctl = ifelse( (data2$mirna=="C81"), 1, 0 )
data2$is_case = ifelse( (data2$mirna=="C81"), 0, 1 )

assign_start_lower_upper_values_ym155()
ym155_mir2223p_fit.1component = model_ic50_and_stdev.1component(data2)
ym155_mir2223p_fit.2component = model_ic50_and_stdev.2component(data2)

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
ym155_mir2223p.1component_vs_2component.pvalue = pchisq(2*(ym155_mir2223p_fit.2component$model$value - ym155_mir2223p_fit.1component$model$value), degrees_of_freedom, lower.tail = FALSE)
ym155_mir2223p_fit.1component
ym155_mir2223p_fit.2component
ym155_mir2223p.1component_vs_2component.pvalue
ym155_mir2223p_fit.2component$IC50_ctl/ym155_mir2223p_fit.2component$IC50_case # fold change

> ym155_mir2223p_fit.1component
$IC50
[1] 118.5813

$IC50_stdev
[1] 5.757777

$model
                A        B     scal     xmid    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 73.31161 2.057017 0.311432 2.074016 4.333526 -155.8094    126    126    NA        0 TRUE FALSE  0.03

> ym155_mir2223p_fit.2component
$IC50_ctl
[1] 140.2218

$IC50_case
[1] 89.36427

$IC50_ctl_stdev
[1] 8.860208

$IC50_case_stdev
[1] 5.262024

$model
                A        B      scal     xmid     xshift    sigma     value fevals gevals niter convcode  kkt1  kkt2 xtime
L-BFGS-B 74.56516 2.391019 0.3083065 2.146815 -0.1956515 3.033593 -136.7143    143    143    NA        1 FALSE FALSE  0.04

> ym155_mir2223p.1component_vs_2component.pvalue
[1] 6.417633e-10

> ym155_mir2223p_fit.2component$IC50_ctl/ym155_mir2223p_fit.2component$IC50_case # fold change
[1] 1.569103

# Thus, there is a statistically significant difference between YM155-treated MSTO-211H cells when pretreated with miR-222-3p versus C81.
# p-value = 6.417633e-10. C81 IC50 = 140.2218. miR-222-3p IC50 = 89.36427

A = ym155_mir2223p_fit.2component$model$A
B = ym155_mir2223p_fit.2component$model$B
scal = ym155_mir2223p_fit.2component$model$scal
xmid = ym155_mir2223p_fit.2component$model$xmid
xshift = ym155_mir2223p_fit.2component$model$xshift
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1c_ym155_mir2223p_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$mirna)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = ym155_mir2223p_fit.1component$model$A
B = ym155_mir2223p_fit.1component$model$B
scal = ym155_mir2223p_fit.1component$model$scal
xmid = ym155_mir2223p_fit.1component$model$xmid
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1c_ym155_mir2223p_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Which model is appropriate for miR-137-3p pretreatment before YM155 treatment?
########## Does it have a lower TC50 than that of C81 pretreatment before YM155 treatment?
########## Or should both treatments use the same model with the same IC50?
########## p-value is from chi-squared distribution

data2 = data1_ym155[data1_ym155$mirna %in% c("C81","miR-137-3p"),]
data2$is_ctl = ifelse( (data2$mirna=="C81"), 1, 0 )
data2$is_case = ifelse( (data2$mirna=="C81"), 0, 1 )

assign_start_lower_upper_values_ym155()
ym155_mir1373p_fit.1component = model_ic50_and_stdev.1component(data2)
ym155_mir1373p_fit.2component = model_ic50_and_stdev.2component(data2)

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
ym155_mir1373p.1component_vs_2component.pvalue = pchisq(2*(ym155_mir1373p_fit.2component$model$value - ym155_mir1373p_fit.1component$model$value), degrees_of_freedom, lower.tail = FALSE)
ym155_mir1373p_fit.1component
ym155_mir1373p_fit.2component
ym155_mir1373p.1component_vs_2component.pvalue
ym155_mir1373p_fit.2component$IC50_ctl/ym155_mir1373p_fit.2component$IC50_case # fold change

> ym155_mir1373p_fit.1component
$IC50
[1] 171.7485

$IC50_stdev
[1] 2.551056

$model
                A        B      scal     xmid    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 66.49103 2.764913 0.2463118 2.234893 3.501491 -144.2949    127    127    NA        0 TRUE FALSE  0.02

> ym155_mir1373p_fit.2component
$IC50_ctl
[1] 197.2786

$IC50_case
[1] 198.9915

$IC50_ctl_stdev
[1] 7.612903

$IC50_case_stdev
[1] 2.996397

$model
                A         B     scal    xmid      xshift    sigma    value fevals gevals niter convcode  kkt1  kkt2 xtime
L-BFGS-B 63.64692 0.5830407 0.240432 2.29508 0.003754511 4.693461 -151.452    120    120    NA        1 FALSE FALSE  0.03

> ym155_mir1373p.1component_vs_2component.pvalue
[1] 1

> ym155_mir1373p_fit.2component$IC50_ctl/ym155_mir1373p_fit.2component$IC50_case # fold change
[1] 0.9913922

# Thus, there is not a statistically significant difference between YM155-treated MSTO-211H cells when pretreated with miR-137-3p versus C81.
# p-value = 1. C81 and miR-137-3p IC50 = 171.7485

A = ym155_mir1373p_fit.2component$model$A
B = ym155_mir1373p_fit.2component$model$B
scal = ym155_mir1373p_fit.2component$model$scal
xmid = ym155_mir1373p_fit.2component$model$xmid
xshift = ym155_mir1373p_fit.2component$model$xshift
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1c_ym155_mir1373p_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$mirna)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = ym155_mir1373p_fit.1component$model$A
B = ym155_mir1373p_fit.1component$model$B
scal = ym155_mir1373p_fit.1component$model$scal
xmid = ym155_mir1373p_fit.1component$model$xmid
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1c_ym155_mir1373p_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Which model is appropriate for miR-148a-3p pretreatment before YM155 treatment?
########## Does it have a lower TC50 than that of C81 pretreatment before YM155 treatment?
########## Or should both treatments use the same model with the same IC50?
########## p-value is from chi-squared distribution

data2 = data1_ym155[data1_ym155$mirna %in% c("C81","miR-148a-3p"),]
data2$is_ctl = ifelse( (data2$mirna=="C81"), 1, 0 )
data2$is_case = ifelse( (data2$mirna=="C81"), 0, 1 )

assign_start_lower_upper_values_ym155()
ym155_mir148a3p_fit.1component = model_ic50_and_stdev.1component(data2)
ym155_mir148a3p_fit.2component = model_ic50_and_stdev.2component(data2)

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
ym155_mir148a3p.1component_vs_2component.pvalue = pchisq(2*(ym155_mir148a3p_fit.2component$model$value - ym155_mir148a3p_fit.1component$model$value), degrees_of_freedom, lower.tail = FALSE)
ym155_mir148a3p_fit.1component
ym155_mir148a3p_fit.2component
ym155_mir148a3p.1component_vs_2component.pvalue
ym155_mir148a3p_fit.2component$IC50_ctl/ym155_mir148a3p_fit.2component$IC50_case # fold change

> ym155_mir148a3p_fit.1component
$IC50
[1] 117.9034

$IC50_stdev
[1] 18.26458

$model
                A        B      scal     xmid    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 57.31174 2.075892 0.3323261 2.071526 11.53607 -208.6513    138    138    NA        1 TRUE FALSE  0.03

> ym155_mir148a3p_fit.2component
$IC50_ctl
[1] 117.1036

$IC50_case
[1] 18.5033

$IC50_ctl_stdev
[1] 29.67285

$IC50_case_stdev
[1] 4.682781

$model
                A        B      scal    xmid     xshift    sigma     value fevals gevals niter convcode  kkt1  kkt2 xtime
L-BFGS-B 79.28415 4.060466 0.3413082 2.06857 -0.8013211 3.832745 -149.1454    126    126    NA        1 FALSE FALSE  0.04

> ym155_mir148a3p.1component_vs_2component.pvalue
[1] 1.041105e-27

> ym155_mir148a3p_fit.2component$IC50_ctl/ym155_mir148a3p_fit.2component$IC50_case # fold change
[1] 6.328796

# Thus, there is a statistically significant difference between YM155-treated MSTO-211H cells when pretreated with miR-148a-3p versus C81.
# p-value = 1.041105e-27. C81 IC50 = 117.1036. miR-148a-3p IC50 = 18.5033

A = ym155_mir148a3p_fit.2component$model$A
B = ym155_mir148a3p_fit.2component$model$B
scal = ym155_mir148a3p_fit.2component$model$scal
xmid = ym155_mir148a3p_fit.2component$model$xmid
xshift = ym155_mir148a3p_fit.2component$model$xshift
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1c_ym155_mir148a3p_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$mirna)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = ym155_mir148a3p_fit.1component$model$A
B = ym155_mir148a3p_fit.1component$model$B
scal = ym155_mir148a3p_fit.1component$model$scal
xmid = ym155_mir148a3p_fit.1component$model$xmid
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1c_ym155_mir148a3p_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Which model is appropriate for miR-193a-3p pretreatment before YM155 treatment?
########## Does it have a lower TC50 than that of C81 pretreatment before YM155 treatment?
########## Or should both treatments use the same model with the same IC50?
########## p-value is from chi-squared distribution

data2 = data1_ym155[data1_ym155$mirna %in% c("C81","miR-193a-3p"),]
data2$is_ctl = ifelse( (data2$mirna=="C81"), 1, 0 )
data2$is_case = ifelse( (data2$mirna=="C81"), 0, 1 )

assign_start_lower_upper_values_ym155()
ym155_mir193a3p_fit.1component = model_ic50_and_stdev.1component(data2)
ym155_mir193a3p_fit.2component = model_ic50_and_stdev.2component(data2)

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
ym155_mir193a3p.1component_vs_2component.pvalue = pchisq(2*(ym155_mir193a3p_fit.2component$model$value - ym155_mir193a3p_fit.1component$model$value), degrees_of_freedom, lower.tail = FALSE)
ym155_mir193a3p_fit.1component
ym155_mir193a3p_fit.2component
ym155_mir193a3p.1component_vs_2component.pvalue
ym155_mir193a3p_fit.2component$IC50_ctl/ym155_mir193a3p_fit.2component$IC50_case # fold change

> ym155_mir193a3p_fit.1component
$IC50
[1] 131.6782

$IC50_stdev
[1] 9.01855

$model
               A        B      scal     xmid    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 59.9788 2.620722 0.2916352 2.119514 8.607977 -192.8678    110    110    NA        0 TRUE FALSE  0.01

> ym155_mir193a3p_fit.2component
$IC50_ctl
[1] 75.88947

$IC50_case
[1] 20.96736

$IC50_ctl_stdev
[1] 13.2049

$IC50_case_stdev
[1] 5.288356

$model
                A        B      scal     xmid     xshift    sigma     value fevals gevals niter convcode  kkt1  kkt2 xtime
L-BFGS-B 96.85603 1.495933 0.4953659 1.880182 -0.5586379 4.450648 -158.2764    128    128    NA        1 FALSE FALSE  0.03

> ym155_mir193a3p.1component_vs_2component.pvalue
[1] 8.974099e-17

> ym155_mir193a3p_fit.2component$IC50_ctl/ym155_mir193a3p_fit.2component$IC50_case # fold change
[1] 3.619411

# Thus, there is a statistically significant difference between YM155-treated MSTO-211H cells when pretreated with miR-193a-3p versus C81.
# p-value = 8.974099e-17. C81 IC50 = 75.88947. miR-193a-3p IC50 = 20.96736

A = ym155_mir193a3p_fit.2component$model$A
B = ym155_mir193a3p_fit.2component$model$B
scal = ym155_mir193a3p_fit.2component$model$scal
xmid = ym155_mir193a3p_fit.2component$model$xmid
xshift = ym155_mir193a3p_fit.2component$model$xshift
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1c_ym155_mir193a3p_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$mirna)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = ym155_mir193a3p_fit.1component$model$A
B = ym155_mir193a3p_fit.1component$model$B
scal = ym155_mir193a3p_fit.1component$model$scal
xmid = ym155_mir193a3p_fit.1component$model$xmid
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1c_ym155_mir193a3p_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Which model is appropriate for miR-142-5p pretreatment before YM155 treatment?
########## Does it have a lower TC50 than that of C81 pretreatment before YM155 treatment?
########## Or should both treatments use the same model with the same IC50?
########## p-value is from chi-squared distribution

assign_start_lower_upper_values_ym155_mir1425p = function()
{
	A_start = 65;          A_low = 30;              A_high = 120;
	B_start = 20;           B_low = -10;             B_high = 40;
	scal_start = 0.1;       scal_low = -Inf;         scal_high = Inf;
	xmid_start = 0;         xmid_low = -2;           xmid_high = 4;
	xshift_start = 0.1;     xshift_low = -1;         xshift_high = 2;
	sigma_start = 0.1;      sigma_low = 1e-4;        sigma_high = Inf;

	start.1component   = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   sigma=sigma_start)
	lower.1component   = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     sigma=sigma_low)
	upper.1component   = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    sigma=sigma_high)
	assign("start.1component", start.1component, envir = .GlobalEnv)
	assign("lower.1component", lower.1component, envir = .GlobalEnv)
	assign("upper.1component", upper.1component, envir = .GlobalEnv)
	assign("start2.1component", start2.1component, envir = .GlobalEnv)

	start.2component = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   xshift=xshift_start,   sigma=sigma_start)
	lower.2component = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     xshift=xshift_low,     sigma=sigma_low)
	upper.2component = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    xshift=xshift_high,    sigma=sigma_high)
	assign("start.2component", start.2component, envir = .GlobalEnv)
	assign("lower.2component", lower.2component, envir = .GlobalEnv)
	assign("upper.2component", upper.2component, envir = .GlobalEnv)
}

data2 = data1_ym155[data1_ym155$mirna %in% c("C81","miR-142-5p"),]
data2$is_ctl = ifelse( (data2$mirna=="C81"), 1, 0 )
data2$is_case = ifelse( (data2$mirna=="C81"), 0, 1 )

assign_start_lower_upper_values_ym155_mir1425p()
ym155_mir1425p_fit.1component = model_ic50_and_stdev.1component(data2)
ym155_mir1425p_fit.2component = model_ic50_and_stdev.2component(data2)

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
ym155_mir1425p.1component_vs_2component.pvalue = pchisq(2*(ym155_mir1425p_fit.2component$model$value - ym155_mir1425p_fit.1component$model$value), degrees_of_freedom, lower.tail = FALSE)
ym155_mir1425p_fit.1component
ym155_mir1425p_fit.2component
ym155_mir1425p.1component_vs_2component.pvalue
ym155_mir1425p_fit.2component$IC50_ctl/ym155_mir1425p_fit.2component$IC50_case # fold change

> ym155_mir1425p_fit.1component
$IC50
[1] 157.6395

$IC50_stdev
[1] 45.51772

$model
                A        B      scal     xmid    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 67.39895 2.234441 0.2729171 2.197665 3.801918 -148.7258     90     90    NA        0 TRUE FALSE  0.01

> ym155_mir1425p_fit.2component
$IC50_ctl
[1] 164.9626

$IC50_case
[1] 137.8395

$IC50_ctl_stdev
[1] 5.659284

$IC50_case_stdev
[1] 4.909047

$model
                A        B      scal     xmid      xshift    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 68.69456 2.109705 0.2862684 2.217385 -0.07801168 3.622135 -146.1246    120    120    NA        0 TRUE FALSE  0.02

> ym155_mir1425p.1component_vs_2component.pvalue
[1] 0.02255813
> ym155_mir1425p_fit.2component$IC50_ctl/ym155_mir1425p_fit.2component$IC50_case # fold change
[1] 1.196773

# Thus, there is a statistically significant difference between YM155-treated MSTO-211H cells when pretreated with miR-142-5p versus C81.
# p-value = 0.02255813. C81 IC50 = 164.9626. miR-142-5p IC50 = 137.8395

A = ym155_mir1425p_fit.2component$model$A
B = ym155_mir1425p_fit.2component$model$B
scal = ym155_mir1425p_fit.2component$model$scal
xmid = ym155_mir1425p_fit.2component$model$xmid
xshift = ym155_mir1425p_fit.2component$model$xshift
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1c_ym155_mir1425p_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$mirna)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = ym155_mir1425p_fit.1component$model$A
B = ym155_mir1425p_fit.1component$model$B
scal = ym155_mir1425p_fit.1component$model$scal
xmid = ym155_mir1425p_fit.1component$model$xmid
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1c_ym155_mir1425p_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Which model is appropriate for miR-192-5p pretreatment before YM155 treatment?
########## Does it have a lower TC50 than that of C81 pretreatment before YM155 treatment?
########## Or should both treatments use the same model with the same IC50?
########## p-value is from chi-squared distribution

data2 = data1_ym155[data1_ym155$mirna %in% c("C81","miR-192-5p"),]
data2$is_ctl = ifelse( (data2$mirna=="C81"), 1, 0 )
data2$is_case = ifelse( (data2$mirna=="C81"), 0, 1 )

assign_start_lower_upper_values_ym155()
ym155_mir1925p_fit.1component = model_ic50_and_stdev.1component(data2)
ym155_mir1925p_fit.2component = model_ic50_and_stdev.2component(data2)

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
ym155_mir1925p.1component_vs_2component.pvalue = pchisq(2*(ym155_mir1925p_fit.2component$model$value - ym155_mir1925p_fit.1component$model$value), degrees_of_freedom, lower.tail = FALSE)
ym155_mir1925p_fit.1component
ym155_mir1925p_fit.2component
ym155_mir1925p.1component_vs_2component.pvalue
ym155_mir1925p_fit.2component$IC50_ctl/ym155_mir1925p_fit.2component$IC50_case # fold change

> ym155_mir1925p_fit.1component
$IC50
[1] 118.2859

$IC50_stdev
[1] 4.890629

$model
                A        B      scal     xmid    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 69.72656 2.018155 0.3124252 2.072933 5.718121 -170.7757    126    126    NA        0 TRUE FALSE  0.04

> ym155_mir1925p_fit.2component
$IC50_ctl
[1] 134.8733

$IC50_case
[1] 67.93506

$IC50_ctl_stdev
[1] 3.786595

$IC50_case_stdev
[1] 7.758479

$model
                A        B      scal     xmid     xshift    sigma     value fevals gevals niter convcode  kkt1  kkt2 xtime
L-BFGS-B 75.67816 2.155714 0.3353396 2.129926 -0.2978321 3.458142 -142.5193    138    138    NA        1 FALSE FALSE  0.03

> ym155_mir1925p.1component_vs_2component.pvalue
[1] 5.583392e-14 

> ym155_mir1925p_fit.2component$IC50_ctl/ym155_mir1925p_fit.2component$IC50_case # fold change
[1] 1.985327

# Thus, there is a statistically significant difference between YM155-treated MSTO-211H cells when pretreated with miR-192-5p versus C81.
# p-value = 5.583392e-14 . C81 IC50 = 134.8733. miR-192-5p IC50 = 67.93506

A = ym155_mir1925p_fit.2component$model$A
B = ym155_mir1925p_fit.2component$model$B
scal = ym155_mir1925p_fit.2componentv$scal
xmid = ym155_mir1925p_fit.2component$model$xmid
xshift = ym155_mir1925p_fit.2component$model$xshift
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1c_ym155_mir1925p_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$mirna)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = ym155_mir1925p_fit.1component$model$A
B = ym155_mir1925p_fit.1component$model$B
scal = ym155_mir1925p_fit.1component$model$scal
xmid = ym155_mir1925p_fit.1component$model$xmid
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1c_ym155_mir1925p_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Which model is appropriate for miR-122-5p pretreatment before YM155 treatment?
########## Does it have a lower TC50 than that of C81 pretreatment before YM155 treatment?
########## Or should both treatments use the same model with the same IC50?
########## p-value is from chi-squared distribution

assign_start_lower_upper_values_ym155_mir1225p = function()
{
	A_start = 65;          A_low = 30;              A_high = 120;
	B_start = 20;           B_low = -10;             B_high = 40;
	scal_start = 0.1;       scal_low = -Inf;         scal_high = Inf;
	xmid_start = 0;         xmid_low = -2;           xmid_high = 4;
	xshift_start = 0.1;     xshift_low = -1;         xshift_high = 2;
	sigma_start = 0.1;      sigma_low = 1e-4;        sigma_high = Inf;

	start.1component   = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   sigma=sigma_start)
	lower.1component   = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     sigma=sigma_low)
	upper.1component   = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    sigma=sigma_high)
	assign("start.1component", start.1component, envir = .GlobalEnv)
	assign("lower.1component", lower.1component, envir = .GlobalEnv)
	assign("upper.1component", upper.1component, envir = .GlobalEnv)
	assign("start2.1component", start2.1component, envir = .GlobalEnv)

	start.2component = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   xshift=xshift_start,   sigma=sigma_start)
	lower.2component = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     xshift=xshift_low,     sigma=sigma_low)
	upper.2component = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    xshift=xshift_high,    sigma=sigma_high)
	assign("start.2component", start.2component, envir = .GlobalEnv)
	assign("lower.2component", lower.2component, envir = .GlobalEnv)
	assign("upper.2component", upper.2component, envir = .GlobalEnv)
}

data2 = data1_ym155[data1_ym155$mirna %in% c("C81","miR-122-5p"),]
data2$is_ctl = ifelse( (data2$mirna=="C81"), 1, 0 )
data2$is_case = ifelse( (data2$mirna=="C81"), 0, 1 )

assign_start_lower_upper_values_ym155_mir1225p()
ym155_mir1225p_fit.1component = model_ic50_and_stdev.1component(data2)
ym155_mir1225p_fit.2component = model_ic50_and_stdev.2component(data2)

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
ym155_mir1225p.1component_vs_2component.pvalue = pchisq(2*(ym155_mir1225p_fit.2component$model$value - ym155_mir1225p_fit.1component$model$value), degrees_of_freedom, lower.tail = FALSE)
ym155_mir1225p_fit.1component
ym155_mir1225p_fit.2component
ym155_mir1225p.1component_vs_2component.pvalue
ym155_mir1225p_fit.2component$IC50_ctl/ym155_mir1225p_fit.2component$IC50_case # fold change

> ym155_mir1225p_fit.1component
$IC50
[1] 143.1455

$IC50_stdev
[1] 4.096278

$model
                A       B      scal     xmid    sigma    value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 70.10252 2.19305 0.2711351 2.155778 3.304322 -141.171     87     87    NA        0 TRUE FALSE  0.02

> ym155_mir1225p_fit.2component
$IC50_ctl
[1] 166.773

$IC50_case
[1] 131.1784

$IC50_ctl_stdev
[1] 7.078604

$IC50_case_stdev
[1] 3.875005

$model
                A        B      scal     xmid     xshift   sigma     value fevals gevals niter convcode  kkt1  kkt2 xtime
L-BFGS-B 68.16941 2.801115 0.2490247 2.222126 -0.1042634 3.05016 -136.0773    122    122    NA        1 FALSE FALSE  0.01

> ym155_mir1225p.1component_vs_2component.pvalue
[1] 0.001413991
> ym155_mir1225p_fit.2component$IC50_ctl/ym155_mir1225p_fit.2component$IC50_case # fold change
[1] 1.271345

# Thus, there is a statistically significant difference between YM155-treated MSTO-211H cells when pretreated with miR-122-5p versus C81.
# p-value = 0.001413991. C81 IC50 = 166.773. miR-122-5p IC50 = 131.1784

A = ym155_mir1225p_fit.2component$model$A
B = ym155_mir1225p_fit.2component$model$B
scal = ym155_mir1225p_fit.2component$model$scal
xmid = ym155_mir1225p_fit.2component$model$xmid
xshift = ym155_mir1225p_fit.2component$model$xshift
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1c_ym155_mir1225p_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$mirna)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = ym155_mir1225p_fit.1component$model$A
B = ym155_mir1225p_fit.1component$model$B
scal = ym155_mir1225p_fit.1component$model$scal
xmid = ym155_mir1225p_fit.1component$model$xmid
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1c_ym155_mir1225p_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Which model is appropriate for miR-214-3p pretreatment before YM155 treatment?
########## Does it have a lower TC50 than that of C81 pretreatment before YM155 treatment?
########## Or should both treatments use the same model with the same IC50?
########## p-value is from chi-squared distribution

data2 = data1_ym155[data1_ym155$mirna %in% c("C81","miR-214-3p"),]
data2$is_ctl = ifelse( (data2$mirna=="C81"), 1, 0 )
data2$is_case = ifelse( (data2$mirna=="C81"), 0, 1 )

assign_start_lower_upper_values_ym155()
ym155_mir2143p_fit.1component = model_ic50_and_stdev.1component(data2)
ym155_mir2143p_fit.2component = model_ic50_and_stdev.2component(data2)

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
ym155_mir2143p.1component_vs_2component.pvalue = pchisq(2*(ym155_mir2143p_fit.2component$model$value - ym155_mir2143p_fit.1component$model$value), degrees_of_freedom, lower.tail = FALSE)
ym155_mir2143p_fit.1component
ym155_mir2143p_fit.2component
ym155_mir2143p.1component_vs_2component.pvalue
ym155_mir2143p_fit.2component$IC50_ctl/ym155_mir2143p_fit.2component$IC50_case # fold change

> ym155_mir2143p_fit.1component
$IC50
[1] 146.0534

$IC50_stdev
[1] 6.6484

$model
                A        B      scal     xmid    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 63.77112 2.414618 0.2814532 2.164512 5.736164 -170.9712    141    141    NA        1 TRUE FALSE  0.04

> ym155_mir2143p_fit.2component
$IC50_ctl
[1] 149.1257

$IC50_case
[1] 76.72651

$IC50_ctl_stdev
[1] 17.90265

$IC50_case_stdev
[1] 9.616959

$model
                A        B      scal     xmid     xshift    sigma     value fevals gevals niter convcode  kkt1  kkt2 xtime
L-BFGS-B 72.38605 1.995751 0.3500756 2.173553 -0.2886071 4.223555 -154.6148    126    126    NA        1 FALSE FALSE  0.03

> ym155_mir2143p.1component_vs_2component.pvalue
[1] 1.068228e-08

> ym155_mir2143p_fit.2component$IC50_ctl/ym155_mir2143p_fit.2component$IC50_case # fold change
[1] 1.943601

# Thus, there is a statistically significant difference between YM155-treated MSTO-211H cells when pretreated with miR-214-3p versus C81.
# p-value = 1.068228e-08. C81 IC50 = 149.1257. miR-214-3p IC50 = 76.72651

A = ym155_mir2143p_fit.2component$model$A
B = ym155_mir2143p_fit.2component$model$B
scal = ym155_mir2143p_fit.2component$model$scal
xmid = ym155_mir2143p_fit.2component$model$xmid
xshift = ym155_mir2143p_fit.2component$model$xshift
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1c_ym155_mir2143p_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$mirna)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = ym155_mir2143p_fit.1component$model$A
B = ym155_mir2143p_fit.1component$model$B
scal = ym155_mir2143p_fit.1component$model$scal
xmid = ym155_mir2143p_fit.1component$model$xmid
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig1c_ym155_mir2143p_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Statistical significance and inflexion point (IC50) and its standard deviation
########## Figure 1D

data4 = read.table("data_figure1d_PND1186.txt", sep = "\t", header = TRUE)

data4$experiment = as.character(data4$experiment)
data4$dose = as.numeric(as.character(data4$dose))
data4$growth = as.numeric(as.character(data4$growth))
data4$log10_dose = log10(data4$dose)

# remove dose = 0, which is log10_dose = -Inf
data4 = data4[(data4$dose>0),]

data1_PND1186 = data4

plot_name = 'fig1d_data_log.png'
ggplot(data4, aes(x=log10(dose), y=growth, col=experiment)) + geom_point() + facet_wrap(~mirna) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )
plot_name = 'fig1d_data.png'
ggplot(data4, aes(x=dose, y=growth, col=experiment)) + geom_point() + scale_x_log10() + facet_wrap(~mirna) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

assign_start_lower_upper_values_pnd = function()
{
	A_start = 100;          A_low = 30;              A_high = 120;
	B_start = 20;           B_low = -10;             B_high = 40;
	scal_start = 0.1;       scal_low = -Inf;         scal_high = Inf;
	xmid_start = 0;         xmid_low = -2;           xmid_high = 4;
	xshift_start = 0.1;     xshift_low = -1;         xshift_high = 2;
	sigma_start = 0.1;      sigma_low = 1e-4;        sigma_high = Inf;

	start.1component   = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   sigma=sigma_start)
	lower.1component   = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     sigma=sigma_low)
	upper.1component   = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    sigma=sigma_high)
	assign("start.1component", start.1component, envir = .GlobalEnv)
	assign("lower.1component", lower.1component, envir = .GlobalEnv)
	assign("upper.1component", upper.1component, envir = .GlobalEnv)
	assign("start2.1component", start2.1component, envir = .GlobalEnv)

	start.2component = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   xshift=xshift_start,   sigma=sigma_start)
	lower.2component = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     xshift=xshift_low,     sigma=sigma_low)
	upper.2component = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    xshift=xshift_high,    sigma=sigma_high)
	assign("start.2component", start.2component, envir = .GlobalEnv)
	assign("lower.2component", lower.2component, envir = .GlobalEnv)
	assign("upper.2component", upper.2component, envir = .GlobalEnv)
}
assign_start_lower_upper_values_pnd()


########## Which model is appropriate for miR-17-5p pretreatment before PND-1186 treatment?
########## Does it have a lower TC50 than that of C81 pretreatment before PND-1186 treatment?
########## Or should both treatments use the same model with the same IC50?
########## p-value is from chi-squared distribution

data2 = data1_PND1186[data1_PND1186$mirna %in% c("C81","miR-17-5p"),]
data2$is_ctl = ifelse( (data2$mirna=="C81"), 1, 0 )
data2$is_case = ifelse( (data2$mirna=="C81"), 0, 1 )

assign_start_lower_upper_values_pnd()
pnd1186_mir175p_fit.1component = model_ic50_and_stdev.1component(data2)
pnd1186_mir175p_fit.2component = model_ic50_and_stdev.2component(data2)

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
pnd1186_mir175p.1component_vs_2component.pvalue = pchisq(2*(pnd1186_mir175p_fit.2component$model$value - pnd1186_mir175p_fit.1component$model$value), degrees_of_freedom, lower.tail = FALSE)
pnd1186_mir175p_fit.1component
pnd1186_mir175p_fit.2component
pnd1186_mir175p.1component_vs_2component.pvalue
pnd1186_mir175p_fit.2component$IC50_ctl/pnd1186_mir175p_fit.2component$IC50_case # fold change

> pnd1186_mir175p_fit.1component
$IC50
[1] 0.5830574

$IC50_stdev
[1] 0.09386468

$model
                A         B      scal       xmid    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 101.6194 -4.454816 0.6838981 -0.2342887 7.753635 -124.8168     60     60    NA        0 TRUE FALSE  0.02

> pnd1186_mir175p_fit.2component
$IC50_ctl
[1] 1.162146

$IC50_case
[1] 0.4332933

$IC50_ctl_stdev
[1] 0.4169295

$IC50_case_stdev
[1] 0.0177299

$model
                A   B      scal       xmid     xshift    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 102.4951 -10 0.7511865 0.06526075 -0.4284788 6.372336 -117.7514    113    113    NA        1 TRUE FALSE  0.02

> pnd1186_mir175p.1component_vs_2component.pvalue
[1] 0.0001705151

> pnd1186_mir175p_fit.2component$IC50_ctl/pnd1186_mir175p_fit.2component$IC50_case # fold change
[1] 2.682124

# Thus, there is a statistically significant difference between PND-1186-treated VMC23 cells when pretreated with miR-17-5p versus C81.
# p-value = 0.0001705151. C81 IC50 = 1.162146. miR-17-5p IC50 = 0.4332933

A = pnd1186_mir175p_fit.2component$model$A
B = pnd1186_mir175p_fit.2component$model$B
scal = pnd1186_mir175p_fit.2component$model$scal
xmid = pnd1186_mir175p_fit.2component$model$xmid
xshift = pnd1186_mir175p_fit.2component$model$xshift
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3 )
data3 = data3x3

plot_name = 'fig1d_pnd1186_mir175p_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$mirna)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = pnd1186_mir175p_fit.1component$model$A
B = pnd1186_mir175p_fit.1component$model$B
scal = pnd1186_mir175p_fit.1component$model$scal
xmid = pnd1186_mir175p_fit.1component$model$xmid
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3 )
data3 = data3x3

plot_name = 'fig1d_pnd1186_mir175p_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Which model is appropriate for miR-221-3p pretreatment before PND-1186 treatment?
########## Does it have a lower TC50 than that of C81 pretreatment before PND-1186 treatment?
########## Or should both treatments use the same model with the same IC50?
########## p-value is from chi-squared distribution

data2 = data1_PND1186[data1_PND1186$mirna %in% c("C81","miR-221-3p"),]
data2$is_ctl = ifelse( (data2$mirna=="C81"), 1, 0 )
data2$is_case = ifelse( (data2$mirna=="C81"), 0, 1 )

assign_start_lower_upper_values_pnd()
pnd1186_mir2213p_fit.1component = model_ic50_and_stdev.1component(data2)
pnd1186_mir2213p_fit.2component = model_ic50_and_stdev.2component(data2)

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
pnd1186_mir2213p.1component_vs_2component.pvalue = pchisq(2*(pnd1186_mir2213p_fit.2component$model$value - pnd1186_mir2213p_fit.1component$model$value), degrees_of_freedom, lower.tail = FALSE)
pnd1186_mir2213p_fit.1component
pnd1186_mir2213p_fit.2component
pnd1186_mir2213p.1component_vs_2component.pvalue
pnd1186_mir2213p_fit.2component$IC50_ctl/pnd1186_mir2213p_fit.2component$IC50_case # fold change

> pnd1186_mir2213p_fit.1component
$IC50
[1] 0.4017791

$IC50_stdev
[1] 0.03944055

$model
                A         B      scal       xmid   sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 105.9714 -4.822718 0.8006564 -0.3960127 8.17353 -126.7144     63     63    NA        0 TRUE FALSE  0.02

> pnd1186_mir2213p_fit.2component
$IC50_ctl
[1] 0.8148671

$IC50_case
[1] 0.1960339

$IC50_ctl_stdev
[1] 0.08900881

$IC50_case_stdev
[1] 0.05270617

$model
                A         B      scal        xmid     xshift    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 106.4657 -5.506466 0.8003147 -0.08891323 -0.6187556 5.296214 -111.0891    101    101    NA        0 TRUE FALSE  0.02

> pnd1186_mir2213p.1component_vs_2component.pvalue
[1] 2.267626e-08 

> pnd1186_mir2213p_fit.2component$IC50_ctl/pnd1186_mir2213p_fit.2component$IC50_case # fold change
[1] 4.156766

# Thus, there is a statistically significant difference between PND-1186-treated VMC23 cells when pretreated with miR-221-3p versus C81.
# p-value = 2.267626e-08. C81 IC50 = 0.8148671. miR-221-3p IC50 = 0.1960339

A = pnd1186_mir2213p_fit.2component$model$A
B = pnd1186_mir2213p_fit.2component$model$B
scal = pnd1186_mir2213p_fit.2component$model$scal
xmid = pnd1186_mir2213p_fit.2component$model$xmid
xshift = pnd1186_mir2213p_fit.2component$model$xshift
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3 )
data3 = data3x3

plot_name = 'fig1d_pnd1186_mir2213p_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$mirna)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = pnd1186_mir2213p_fit.1component$model$A
B = pnd1186_mir2213p_fit.1component$model$B
scal = pnd1186_mir2213p_fit.1component$model$scal
xmid = pnd1186_mir2213p_fit.1component$model$xmid
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3 )
data3 = data3x3

plot_name = 'fig1d_pnd1186_mir2213p_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Which model is appropriate for miR-222-3p pretreatment before PND-1186 treatment?
########## Does it have a lower TC50 than that of C81 pretreatment before PND-1186 treatment?
########## Or should both treatments use the same model with the same IC50?
########## p-value is from chi-squared distribution

data2 = data1_PND1186[data1_PND1186$mirna %in% c("C81","miR-222-3p"),]
data2$is_ctl = ifelse( (data2$mirna=="C81"), 1, 0 )
data2$is_case = ifelse( (data2$mirna=="C81"), 0, 1 )

assign_start_lower_upper_values_pnd()
pnd1186_mir2223p_fit.1component = model_ic50_and_stdev.1component(data2)
pnd1186_mir2223p_fit.2component = model_ic50_and_stdev.2component(data2)

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
pnd1186_mir2223p.1component_vs_2component.pvalue = pchisq(2*(pnd1186_mir2223p_fit.2component$model$value - pnd1186_mir2223p_fit.1component$model$value), degrees_of_freedom, lower.tail = FALSE)
pnd1186_mir2223p_fit.1component
pnd1186_mir2223p_fit.2component
pnd1186_mir2223p.1component_vs_2component.pvalue
pnd1186_mir2223p_fit.2component$IC50_ctl/pnd1186_mir2223p_fit.2component$IC50_case # fold change

> pnd1186_mir2223p_fit.1component
$IC50
[1] 0.4630392

$IC50_stdev
[1] 0.2221813

$model
                A       B      scal       xmid    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 98.61731 -6.7128 0.8814889 -0.3343823 12.39228 -141.6982     76     76    NA        0 TRUE FALSE     0

> pnd1186_mir2223p_fit.2component
$IC50_ctl
[1] 0.8904609

$IC50_case
[1] 0.08904609

$IC50_ctl_stdev
[1] 0.3466436

$IC50_case_stdev
[1] 0.02849155

$model
                A         B      scal        xmid xshift    sigma     value fevals gevals niter convcode  kkt1  kkt2 xtime
L-BFGS-B 102.6944 -4.008875 0.9216796 -0.05038517     -1 8.021712 -126.0394     71     71    NA        0 FALSE FALSE  0.02

> pnd1186_mir2223p.1component_vs_2component.pvalue
[1] 2.190797e-08 

> pnd1186_mir2223p_fit.2component$IC50_ctl/pnd1186_mir2223p_fit.2component$IC50_case # fold change
[1] 10

# Thus, there is a statistically significant difference between PND-1186-treated VMC23 cells when pretreated with miR-222-3p versus C81.
# p-value = 2.190797e-08. C81 IC50 = 0.8904609. miR-222-3p IC50 = 0.08904609

A = pnd1186_mir2223p_fit.2component$model$A
B = pnd1186_mir2223p_fit.2component$model$B
scal = pnd1186_mir2223p_fit.2component$model$scal
xmid = pnd1186_mir2223p_fit.2component$model$xmid
xshift = pnd1186_mir2223p_fit.2component$model$xshift
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3 )
data3 = data3x3

plot_name = 'fig1d_pnd1186_mir2223p_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$mirna)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = pnd1186_mir2223p_fit.1component$model$A
B = pnd1186_mir2223p_fit.1component$model$B
scal = pnd1186_mir2223p_fit.1component$model$scal
xmid = pnd1186_mir2223p_fit.1component$model$xmid
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3 )
data3 = data3x3

plot_name = 'fig1d_pnd1186_mir2223p_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Which model is appropriate for miR-137-3p pretreatment before PND-1186 treatment?
########## Does it have a lower TC50 than that of C81 pretreatment before PND-1186 treatment?
########## Or should both treatments use the same model with the same IC50?
########## p-value is from chi-squared distribution

data2 = data1_PND1186[data1_PND1186$mirna %in% c("C81","miR-137-3p"),]
data2$is_ctl = ifelse( (data2$mirna=="C81"), 1, 0 )
data2$is_case = ifelse( (data2$mirna=="C81"), 0, 1 )

assign_start_lower_upper_values_pnd()
pnd1186_mir1373p_fit.1component = model_ic50_and_stdev.1component(data2)
pnd1186_mir1373p_fit.2component = model_ic50_and_stdev.2component(data2)

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
pnd1186_mir1373p.1component_vs_2component.pvalue = pchisq(2*(pnd1186_mir1373p_fit.2component$model$value - pnd1186_mir1373p_fit.1component$model$value), degrees_of_freedom, lower.tail = FALSE)
pnd1186_mir1373p_fit.1component
pnd1186_mir1373p_fit.2component
pnd1186_mir1373p.1component_vs_2component.pvalue
pnd1186_mir1373p_fit.2component$IC50_ctl/pnd1186_mir1373p_fit.2component$IC50_case # fold change

> pnd1186_mir1373p_fit.1component
$IC50
[1] 1.062912

$IC50_stdev
[1] 0.3256989

$model
                A         B     scal       xmid    sigma    value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 101.8213 -8.705459 0.650826 0.02649749 7.101534 -121.641     72     72    NA        0 TRUE FALSE  0.01

> pnd1186_mir1373p_fit.2component
$IC50_ctl
[1] 1.1562

$IC50_case
[1] 1.061826

$IC50_ctl_stdev
[1] 0.4410966

$IC50_case_stdev
[1] 0.2998523

$model
                A         B      scal       xmid      xshift    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 101.9105 -9.861705 0.6624625 0.06303284 -0.03697931 7.088845 -121.5888     78     78    NA        0 TRUE FALSE  0.02

> pnd1186_mir1373p.1component_vs_2component.pvalue
[1] 0.7465071

> pnd1186_mir1373p_fit.2component$IC50_ctl/pnd1186_mir1373p_fit.2component$IC50_case # fold change
[1] 1.088878

# Thus, there is not a statistically significant difference between PND-1186-treated VMC23 cells when pretreated with miR-137-3p versus C81.
# p-value = 0.7465071 C81 and miR-137-3p IC50 = 1.062912

A = pnd1186_mir1373p_fit.2component$model$A
B = pnd1186_mir1373p_fit.2component$model$B
scal = pnd1186_mir1373p_fit.2component$model$scal
xmid = pnd1186_mir1373p_fit.2component$model$xmid
xshift = pnd1186_mir1373p_fit.2component$model$xshift
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3 )
data3 = data3x3

plot_name = 'fig1d_pnd1186_mir1373p_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$mirna)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = pnd1186_mir1373p_fit.1component$model$A
B = pnd1186_mir1373p_fit.1component$model$B
scal = pnd1186_mir1373p_fit.1component$model$scal
xmid = pnd1186_mir1373p_fit.1component$model$xmid
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3 )
data3 = data3x3

plot_name = 'fig1d_pnd1186_mir1373p_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Which model is appropriate for miR-148a-3p pretreatment before PND-1186 treatment?
########## Does it have a lower TC50 than that of C81 pretreatment before PND-1186 treatment?
########## Or should both treatments use the same model with the same IC50?
########## p-value is from chi-squared distribution

data2 = data1_PND1186[data1_PND1186$mirna %in% c("C81","miR-148a-3p"),]
data2$is_ctl = ifelse( (data2$mirna=="C81"), 1, 0 )
data2$is_case = ifelse( (data2$mirna=="C81"), 0, 1 )

assign_start_lower_upper_values_pnd()
pnd1186_mir148a3p_fit.1component = model_ic50_and_stdev.1component(data2)
pnd1186_mir148a3p_fit.2component = model_ic50_and_stdev.2component(data2)

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
pnd1186_mir148a3p.1component_vs_2component.pvalue = pchisq(2*(pnd1186_mir148a3p_fit.2component$model$value - pnd1186_mir148a3p_fit.1component$model$value), degrees_of_freedom, lower.tail = FALSE)
pnd1186_mir148a3p_fit.1component
pnd1186_mir148a3p_fit.2component
pnd1186_mir148a3p.1component_vs_2component.pvalue
pnd1186_mir148a3p_fit.2component$IC50_ctl/pnd1186_mir148a3p_fit.2component$IC50_case # fold change

> pnd1186_mir148a3p_fit.1component
$IC50
[1] 0.8486061

$IC50_stdev
[1] 0.2534092

$model
                A         B     scal        xmid    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 104.8709 -7.561216 0.684029 -0.07129385 5.927558 -115.1474     67     67    NA        0 TRUE FALSE  0.01

> pnd1186_mir148a3p_fit.2component
$IC50_ctl
[1] 0.9912016

$IC50_case
[1] 0.8275947

$IC50_ctl_stdev
[1] 0.263982

$IC50_case_stdev
[1] 0.2183803

$model
                A         B      scal         xmid      xshift   sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 104.9682 -9.239213 0.7000178 -0.003838019 -0.07834425 5.86917 -114.7877     76     76    NA        0 TRUE FALSE  0.01

> pnd1186_mir148a3p.1component_vs_2component.pvalue
[1] 0.3963432 

> pnd1186_mir148a3p_fit.2component$IC50_ctl/pnd1186_mir148a3p_fit.2component$IC50_case # fold change
[1] 1.19769

# Thus, there is not a statistically significant difference between PND-1186-treated VMC23 cells when pretreated with miR-148a-3p versus C81.
# p-value = 0.3963432. C81 and miR-148a-3p IC50 = 0.8486061

A = pnd1186_mir148a3p_fit.2component$model$A
B = pnd1186_mir148a3p_fit.2component$model$B
scal = pnd1186_mir148a3p_fit.2component$model$scal
xmid = pnd1186_mir148a3p_fit.2component$model$xmid
xshift = pnd1186_mir148a3p_fit.2component$model$xshift
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3 )
data3 = data3x3

plot_name = 'fig1d_pnd1186_mir148a3p_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$mirna)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = pnd1186_mir148a3p_fit.1component$model$A
B = pnd1186_mir148a3p_fit.1component$model$B
scal = pnd1186_mir148a3p_fit.1component$model$scal
xmid = pnd1186_mir148a3p_fit.1component$model$xmid
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3 )
data3 = data3x3

plot_name = 'fig1d_pnd1186_mir148a3p_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Which model is appropriate for miR-193a-3p pretreatment before PND-1186 treatment?
########## Does it have a lower TC50 than that of C81 pretreatment before PND-1186 treatment?
########## Or should both treatments use the same model with the same IC50?
########## p-value is from chi-squared distribution

data2 = data1_PND1186[data1_PND1186$mirna %in% c("C81","miR-193a-3p"),]
data2$is_ctl = ifelse( (data2$mirna=="C81"), 1, 0 )
data2$is_case = ifelse( (data2$mirna=="C81"), 0, 1 )

assign_start_lower_upper_values_pnd()
pnd1186_mir193a3p_fit.1component = model_ic50_and_stdev.1component(data2)
pnd1186_mir193a3p_fit.2component = model_ic50_and_stdev.2component(data2)

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
pnd1186_mir193a3p.1component_vs_2component.pvalue = pchisq(2*(pnd1186_mir193a3p_fit.2component$model$value - pnd1186_mir193a3p_fit.1component$model$value), degrees_of_freedom, lower.tail = FALSE)
pnd1186_mir193a3p_fit.1component
pnd1186_mir193a3p_fit.2component
pnd1186_mir193a3p.1component_vs_2component.pvalue
pnd1186_mir193a3p_fit.2component$IC50_ctl/pnd1186_mir193a3p_fit.2component$IC50_case # fold change

> pnd1186_mir193a3p_fit.1component
$IC50
[1] 0.4107486

$IC50_stdev
[1] 0.1742287

$model
                A         B      scal       xmid    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 98.02516 -4.654547 0.8080354 -0.3864239 12.09279 -140.8157     76     76    NA        0 TRUE FALSE  0.01

> pnd1186_mir193a3p_fit.2component
$IC50_ctl
[1] 1.060277

$IC50_case
[1] 0.1060277

$IC50_ctl_stdev
[1] 0.6040875

$IC50_case_stdev
[1] 0.06040875

$model
                A         B      scal       xmid xshift    sigma     value fevals gevals niter convcode  kkt1  kkt2 xtime
L-BFGS-B 102.5924 -7.617499 0.9234751 0.02541922     -1 7.323107 -122.7596     87     87    NA        0 FALSE FALSE  0.02

> pnd1186_mir193a3p.1component_vs_2component.pvalue
[1] 1.8627e-09

> pnd1186_mir193a3p_fit.2component$IC50_ctl/pnd1186_mir193a3p_fit.2component$IC50_case # fold change
[1] 10

# Thus, there is a statistically significant difference between PND-1186-treated VMC23 cells when pretreated with miR-193a-3p versus C81.
# p-value = 1.8627e-09. C81 IC50 = 1.060277. miR-193-3p IC50 = 0.1060277

A = pnd1186_mir193a3p_fit.2component$model$A
B = pnd1186_mir193a3p_fit.2component$model$B
scal = pnd1186_mir193a3p_fit.2component$model$scal
xmid = pnd1186_mir193a3p_fit.2component$model$xmid
xshift = pnd1186_mir193a3p_fit.2component$model$xshift
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3 )
data3 = data3x3

plot_name = 'fig1d_pnd1186_mir193a3p_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$mirna)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = pnd1186_mir193a3p_fit.1component$model$A
B = pnd1186_mir193a3p_fit.1component$model$B
scal = pnd1186_mir193a3p_fit.1component$model$scal
xmid = pnd1186_mir193a3p_fit.1component$model$xmid
data3 = data2[(data2$experiment=="1") ,c("cellline", "dose", "drug", "mirna", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3 )
data3 = data3x3

plot_name = 'fig1d_pnd1186_mir193a3p_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=mirna)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Statistical significance
########## Figure 2B
##########

data60 = read.table("data_figure2b_GW4869.txt", sep = "\t", header = TRUE)

data60$experiment = as.character(data60$experiment)
data60$relative_exosome_production = as.numeric(as.character(data60$relative_exosome_production))

data60_met5a_ctl = data60[((data60$cellline=="Met5A")&(data60$treatment=="control")),c("relative_exosome_production")]
data60_met5a_case = data60[((data60$cellline=="Met5A")&(data60$treatment!="control")),c("relative_exosome_production")]
t.test(data60_met5a_ctl, data60_met5a_case)
	Welch Two Sample t-test
data:  data60_met5a_ctl and data60_met5a_case
t = 2.4411, df = 1.2895, p-value = 0.2
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 -0.6210368  1.2082568
sample estimates:
mean of x mean of y 
  1.00000   0.70639 

data60_h2052_ctl = data60[((data60$cellline=="H2052")&(data60$treatment=="control")),c("relative_exosome_production")]
data60_h2052_case = data60[((data60$cellline=="H2052")&(data60$treatment!="control")),c("relative_exosome_production")]
t.test(data60_h2052_ctl, data60_h2052_case)
	Welch Two Sample t-test
data:  data60_h2052_ctl and data60_h2052_case
t = 7.6525, df = 1.9081, p-value = 0.01898
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 0.4347485 1.6809685
sample estimates:
mean of x mean of y 
1.5094990 0.4516405

data60_h28_ctl = data60[((data60$cellline=="H28")&(data60$treatment=="control")),c("relative_exosome_production")]
data60_h28_case = data60[((data60$cellline=="H28")&(data60$treatment!="control")),c("relative_exosome_production")]
t.test(data60_h28_ctl, data60_h28_case)
	Welch Two Sample t-test
data:  data60_h28_ctl and data60_h28_case
t = 9.3955, df = 1.0069, p-value = 0.06655
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 -0.2283937  1.6100867
sample estimates:
mean of x mean of y 
 1.090674  0.399827 

data60_h226_ctl = data60[((data60$cellline=="H226")&(data60$treatment=="control")),c("relative_exosome_production")]
data60_h226_case = data60[((data60$cellline=="H226")&(data60$treatment!="control")),c("relative_exosome_production")]
t.test(data60_h226_ctl, data60_h226_case)
	Welch Two Sample t-test
data:  data60_h226_ctl and data60_h226_case
t = 11.49, df = 1.6374, p-value = 0.01471
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 0.3087849 0.8483831
sample estimates:
mean of x mean of y 
 1.103627  0.525043

data60_msto_ctl = data60[((data60$cellline=="MSTO")&(data60$treatment=="control")),c("relative_exosome_production")]
data60_msto_case = data60[((data60$cellline=="MSTO")&(data60$treatment!="control")),c("relative_exosome_production")]
t.test(data60_msto_ctl, data60_msto_case)
	Welch Two Sample t-test
data:  data60_msto_ctl and data60_msto_case
t = 4.9622, df = 1.3031, p-value = 0.08411
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 -0.384167  1.904029
sample estimates:
mean of x mean of y 
1.4620035 0.7020725

data60_mm05_ctl = data60[((data60$cellline=="MM05")&(data60$treatment=="control")),c("relative_exosome_production")]
data60_mm05_case = data60[((data60$cellline=="MM05")&(data60$treatment!="control")),c("relative_exosome_production")]
t.test(data60_mm05_ctl, data60_mm05_case)
	Welch Two Sample t-test
data:  data60_mm05_ctl and data60_mm05_case
t = 9.5695, df = 1.1622, p-value = 0.04775
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 0.03530593 1.76953007
sample estimates:
mean of x mean of y 
1.5613125 0.6588945 

data60_vmc20_ctl = data60[((data60$cellline=="VMC 20")&(data60$treatment=="control")),c("relative_exosome_production")]
data60_vmc20_case = data60[((data60$cellline=="VMC 20")&(data60$treatment!="control")),c("relative_exosome_production")]
t.test(data60_vmc20_ctl, data60_vmc20_case)
	Welch Two Sample t-test
data:  data60_vmc20_ctl and data60_vmc20_case
t = 9.4728, df = 1.4706, p-value = 0.02703
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 0.348842 1.663248
sample estimates:
mean of x mean of y 
1.5656305 0.5595855 

data60_vmc23_ctl = data60[((data60$cellline=="VMC23")&(data60$treatment=="control")),c("relative_exosome_production")]
data60_vmc23_case = data60[((data60$cellline=="VMC23")&(data60$treatment!="control")),c("relative_exosome_production")]
t.test(data60_vmc23_ctl, data60_vmc23_case)
	Welch Two Sample t-test
data:  data60_vmc23_ctl and data60_vmc23_case
t = 15.617, df = 1.9081, p-value = 	0.00495
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 0.6143128 1.1128032
sample estimates:
mean of x mean of y 
 1.552677  0.689119 

data60_vmc40_ctl = data60[((data60$cellline=="VMC40")&(data60$treatment=="control")),c("relative_exosome_production")]
data60_vmc40_case = data60[((data60$cellline=="VMC40")&(data60$treatment!="control")),c("relative_exosome_production")]
t.test(data60_vmc40_ctl, data60_vmc40_case)
	Welch Two Sample t-test
data:  data60_vmc40_ctl and data60_vmc40_case
t = 17.779, df = 1.6099, p-value = 0.007713
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 0.7381571 1.3948309
sample estimates:
mean of x mean of y 
1.5829015 0.5164075 

### Conclusion

The difference in exosome production between control and treated cells is statistically significant in all cell lines
except Met5A is not statistically significant, and H28 and MSTO are not quite statistically significant.

cell-line	p-value
MET5A		0.2
H2052		0.01898
H28		0.06655
H226		0.01471
MSTO		0.08411
MM05		0.04775
VMC20		0.02703
VMC23		0.00495
VMC40		0.007713


########## Does GW4896 pretreatment of MSTO-211H have a higher TC50 than control when exosomes are not inhibited?
########## p-value is from chi-squared distribution
########## Figure 2C

data11 = read.table("data_figure2c_MSTO.txt", sep = "\t", header = TRUE)

data11$experiment = as.character(data11$experiment)
data11$dose = as.numeric(as.character(data11$dose))
data11$growth = as.numeric(as.character(data11$growth))
data11$log10_dose = log10(data11$dose)

plot_name = 'fig2c_data_log.png'
ggplot(data11, aes(x=log10(dose), y=growth, col=pretreatment)) + geom_point()  + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )
plot_name = 'fig2c_data.png'
ggplot(data11, aes(x=dose, y=growth, col=pretreatment)) + geom_point() + scale_x_log10() + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

# First data point looks fine, no need to remove it for that reason. But log value is -Inf, so can't use, so remove.
data11 = data11[data11$dose>0,]

data2 = data11
data2$is_ctl = ifelse( (data2$pretreatment=="control"), 1, 0 )
data2$is_case = ifelse( (data2$pretreatment=="control"), 0, 1 )

MSTO211H_GW4896_fit.1component = optimx(start.1component, function(par) loglik.1component(par, x=data2$log10_dose, y=data2$growth), lower=lower.1component, upper=upper.1component, method=c("L-BFGS-B"), control=list(fnscale = -1))
MSTO211H_GW4896_fit.2component = optimx(start.2component, function(par) loglik.2component(par, x=data2$log10_dose, y=data2$growth, is_ctl=data2$is_ctl, is_case=data2$is_case), lower=lower.2component, upper=upper.2component, method=c("L-BFGS-B"), control=list(fnscale = -1))

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
MSTO211H_GW4896.1component_vs_2component.pvalue = pchisq(2*(MSTO211H_GW4896_fit.2component$value - MSTO211H_GW4896_fit.1component$value), degrees_of_freedom, lower.tail = FALSE)
MSTO211H_GW4896_fit.1component
MSTO211H_GW4896_fit.2component
MSTO211H_GW4896.1component_vs_2component.pvalue
convert_values_back_to_interpretable.1component(MSTO211H_GW4896_fit.1component)
convert_values_back_to_interpretable.2component(MSTO211H_GW4896_fit.2component)

> MSTO211H_GW4896_fit.1component
               A        B     scal    xmid    sigma   value fevals gevals niter convcode  kkt1  kkt2 xtime
L-BFGS-B 103.728 5.370218 0.146549 2.46973 8.333286 -190.65    274    274    NA        1 FALSE FALSE  0.05
> MSTO211H_GW4896_fit.2component
                A        B        scal     xmid      xshift    sigma     value fevals gevals niter convcode  kkt1  kkt2 xtime
L-BFGS-B 100.0506 19.90011 0.003403751 2.395483 0.007000084 3.100978 -322.6271     88     88    NA        0 FALSE FALSE  0.01
> MSTO211H_GW4896.1component_vs_2component.pvalue
[1] 1
> convert_values_back_to_interpretable.1component(MSTO211H_GW4896_fit.1component)
    TC50 
294.9376 
> convert_values_back_to_interpretable.2component(MSTO211H_GW4896_fit.2component)
 ctl_TC50 case_TC50 
 248.5895  252.6288 
# Thus, there is not a statistically significant difference between MSTO-211H cells when pretreated with GW4896 versus not pretreated.
# p-value = 1. control and GW4896 IC50 = 294.9376

A = MSTO211H_GW4896_fit.2component$A
B = MSTO211H_GW4896_fit.2component$B
scal = MSTO211H_GW4896_fit.2component$scal
xmid = MSTO211H_GW4896_fit.2component$xmid
xshift = MSTO211H_GW4896_fit.2component$xshift
data3 = data2[(data2$experiment=="1"),]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig2c_MSTO211H_GW4896_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=pretreatment)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$pretreatment)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = MSTO211H_GW4896_fit.1component$A
B = MSTO211H_GW4896_fit.1component$B
scal = MSTO211H_GW4896_fit.1component$scal
xmid = MSTO211H_GW4896_fit.1component$xmid
data3 = data2[(data2$experiment=="1"),]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig2c_MSTO211H_GW4896_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=pretreatment)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## Are survivin-related IAP family members up-regulated in MPM cell lines compared to the non-malignant mesothelial MeT-5A control?
########## Figure 3A
########## Table 3

data20 = read.table("data_figure3a_mrna_transporters.txt", sep = "\t", header = TRUE)

data20$experiment = as.character(data20$experiment)
data20$mrna_expression_levels = as.numeric(as.character(data20$mrna_expression_levels))
data20$mrna_cellline = paste( data20$mrna, data20$cellline, sep=" " )

ggplot(data20, aes(x=mrna, y=mrna_expression_levels, color=cellline)) + geom_boxplot() + scale_y_log10()

ggplot(data20, aes(x=mrna, y=mrna_expression_levels, color=cellline)) + geom_point(position="jitter") + scale_y_log10()
ggsave( "figure3a_xaxis_mrna_color_cellline.png", plot=last_plot() )

ggplot(data20, aes(x=cellline, y=mrna_expression_levels, color=mrna)) + geom_point(position="jitter") + scale_y_log10()
ggsave( "figure3a_xaxis_cellline_color_mrna.png", plot=last_plot() )

data21 = data20[(data20$cellline=="MET5A"),]
ggplot(data21, aes(x=cellline, y=mrna_expression_levels, color=mrna)) + geom_boxplot()
ggsave( "figure3a_MET5A.png", plot=last_plot() )

data21 = data20[(data20$cellline=="H226"),]
ggplot(data21, aes(x=cellline, y=mrna_expression_levels, color=mrna)) + geom_boxplot()
ggsave( "figure3a_H226.png", plot=last_plot() )

data21 = data20[(data20$cellline=="Ren"),]
ggplot(data21, aes(x=cellline, y=mrna_expression_levels, color=mrna)) + geom_boxplot()
ggsave( "figure3a_Ren.png", plot=last_plot() )

data21 = data20[(data20$cellline=="VMC40"),]
ggplot(data21, aes(x=cellline, y=mrna_expression_levels, color=mrna)) + geom_boxplot()
ggsave( "figure3a_VMC40.png", plot=last_plot() )

data21 = data20[(data20$cellline=="VMC20"),]
ggplot(data21, aes(x=cellline, y=mrna_expression_levels, color=mrna)) + geom_boxplot()
ggsave( "figure3a_VMC20.png", plot=last_plot() )

data21 = data20[(data20$cellline=="H2052"),]
ggplot(data21, aes(x=cellline, y=mrna_expression_levels, color=mrna)) + geom_boxplot()
ggsave( "figure3a_H2052.png", plot=last_plot() )

data21 = data20[(data20$cellline=="H2452"),]
ggplot(data21, aes(x=cellline, y=mrna_expression_levels, color=mrna)) + geom_boxplot()
ggsave( "figure3a_H2452.png", plot=last_plot() )

data21 = data20[(data20$cellline=="H28"),]
ggplot(data21, aes(x=cellline, y=mrna_expression_levels, color=mrna)) + geom_boxplot()
ggsave( "figure3a_H28.png", plot=last_plot() )

data21 = data20[(data20$cellline=="MSTO"),]
ggplot(data21, aes(x=cellline, y=mrna_expression_levels, color=mrna)) + geom_boxplot()
ggsave( "figure3a_MSTO.png", plot=last_plot() )

data21 = data20[(data20$cellline=="VMC23"),]
ggplot(data21, aes(x=cellline, y=mrna_expression_levels, color=mrna)) + geom_boxplot()
ggsave( "figure3a_VMC23.png", plot=last_plot() )

data21 = data20[(data20$cellline=="MM05"),]
ggplot(data21, aes(x=cellline, y=mrna_expression_levels, color=mrna)) + geom_boxplot()
ggsave( "figure3a_MM05.png", plot=last_plot() )

data22_MET5A = data20[(data20$cellline=="MET5A"),]
data22_H226 = data20[(data20$cellline=="H226"),]
data22_Ren = data20[(data20$cellline=="Ren"),]
data22_VMC40 = data20[(data20$cellline=="VMC40"),]
data22_VMC20 = data20[(data20$cellline=="VMC20"),]
data22_H2052 = data20[(data20$cellline=="H2052"),]
data22_H2452 = data20[(data20$cellline=="H2452"),]
data22_H28 = data20[(data20$cellline=="H28"),]
data22_MSTO = data20[(data20$cellline=="MSTO"),]
data22_VMC23 = data20[(data20$cellline=="VMC23"),]
data22_MM05 = data20[(data20$cellline=="MM05"),]

data23_MDR1 = data22_H226[(data22_H226$mrna=="MDR1 (ABCB1)"),c("mrna_expression_levels")] 
data23_IAP2 = data22_H226[(data22_H226$mrna=="IAP2"),c("mrna_expression_levels")] 
data23_non_MDR1_IAP2 = data22_H226[(!(data22_H226$mrna %in% c("MDR1 (ABCB1)","IAP2"))),c("mrna_expression_levels")] 

# For each cell line, work out the average mrna level.
# Then calculate what each individual mrna level is as a percentage of the average mrna level for that cell line.
# We will see that MDR1 appears to be high in all cell lines, but we will probably see that it is also high in the MET5A control cell line.
# We will see that IAP2 is rather high in most of the cell lines, and that it is not high in MET5A control, and thus is upregulated only in MPM.
# Then t.test for each mrna across all cell lines.

data23 = sqldf("select cellline, avg(mrna_expression_levels) from data20 group by cellline")
data24 = merge( x=data20, y=data23, by=c("cellline"), all.x=TRUE, all.y=TRUE )
names(data24)[names(data24) == 'avg(mrna_expression_levels)'] = 'avg_mrna_expression_levels'
data24$mrna_expression_as_cell_line_fraction = data24$mrna_expression_levels / data24$avg_mrna_expression_levels

ggplot(data24, aes(x=mrna, y=mrna_expression_as_cell_line_fraction, color=cellline)) + geom_point(position="jitter") + scale_y_log10()
ggsave( "figure3a_xaxis_mrna_color_cellline_as_fraction_of_cellline.png", plot=last_plot() )

ggplot(data24, aes(x=cellline, y=mrna_expression_as_cell_line_fraction, color=mrna)) + geom_point(position="jitter") + scale_y_log10()
ggsave( "figure3a_xaxis_cellline_color_mrna_as_fraction_of_cellline.png", plot=last_plot() )

data25_ctl = data24[(data24$cellline=="MET5A")&(data24$mrna=="OCT1"),]
data25_mpm = data24[(data24$cellline!="MET5A")&(data24$mrna=="OCT1"),]
data25 = rbind( data25_ctl, data25_mpm )
data25$mpm_or_ctl = ifelse( (data25$cellline=="MET5A"), "control", "MPM" )
ggplot(data25, aes(x=cellline, y=mrna_expression_as_cell_line_fraction, color=cellline)) + geom_point() + ggtitle("OCT1")
ggsave( "figure3a_OCT1_scatter.png", plot=last_plot() )
ggplot(data25, aes(x=mrna_expression_as_cell_line_fraction, colour=mpm_or_ctl)) + 
  geom_histogram(aes(y=..density..), fill="white") + geom_density(alpha=.2) + ggtitle("OCT1")
ggsave( "figure3a_OCT1_histogram.png", plot=last_plot() )
t.test( x=data25_ctl$mrna_expression_as_cell_line_fraction, y=data25_mpm$mrna_expression_as_cell_line_fraction )
	Welch Two Sample t-test
data:  data25_ctl$mrna_expression_as_cell_line_fraction and data25_mpm$mrna_expression_as_cell_line_fraction
t = 12.541, df = 1.8626, p-value = 0.008186
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 0.5845817 1.2668642
sample estimates:
mean of x mean of y 
1.0123597 0.0866368

data25_ctl = data24[(data24$cellline=="MET5A")&(data24$mrna=="MDR1 (ABCB1)"),]
data25_mpm = data24[(data24$cellline!="MET5A")&(data24$mrna=="MDR1 (ABCB1)"),]
data25 = rbind( data25_ctl, data25_mpm )
data25$mpm_or_ctl = ifelse( (data25$cellline=="MET5A"), "control", "MPM" )
ggplot(data25, aes(x=cellline, y=mrna_expression_as_cell_line_fraction, color=cellline)) + geom_point() + ggtitle("MDR1 (ABCB1)")
ggsave( "figure3a_MDR1_scatter.png", plot=last_plot() )
ggplot(data25, aes(x=mrna_expression_as_cell_line_fraction, colour=mpm_or_ctl)) + 
  geom_histogram(aes(y=..density..), fill="white") + geom_density(alpha=.2) + ggtitle("MDR1 (ABCB1)")
ggsave( "figure3a_MDR1_histogram.png", plot=last_plot() )
t.test( x=data25_ctl$mrna_expression_as_cell_line_fraction, y=data25_mpm$mrna_expression_as_cell_line_fraction )
	Welch Two Sample t-test
data:  data25_ctl$mrna_expression_as_cell_line_fraction and data25_mpm$mrna_expression_as_cell_line_fraction
t = -2.2783, df = 1.5908, p-value = 0.1821
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 -15.16430   6.34737
sample estimates:
mean of x mean of y 
 2.670702  7.079169 

data25_ctl = data24[(data24$cellline=="MET5A")&(data24$mrna=="MRP1"),]
data25_mpm = data24[(data24$cellline!="MET5A")&(data24$mrna=="MRP1"),]
data25 = rbind( data25_ctl, data25_mpm )
data25$mpm_or_ctl = ifelse( (data25$cellline=="MET5A"), "control", "MPM" )
ggplot(data25, aes(x=cellline, y=mrna_expression_as_cell_line_fraction, color=cellline)) + geom_point() + ggtitle("MRP1")
ggsave( "figure3a_MRP1_scatter.png", plot=last_plot() )
ggplot(data25, aes(x=mrna_expression_as_cell_line_fraction, colour=mpm_or_ctl)) + 
  geom_histogram(aes(y=..density..), fill="white") + geom_density(alpha=.2) + ggtitle("MRP1")
ggsave( "figure3a_MRP1_histogram.png", plot=last_plot() )
t.test( x=data25_ctl$mrna_expression_as_cell_line_fraction, y=data25_mpm$mrna_expression_as_cell_line_fraction )
	Welch Two Sample t-test
data:  data25_ctl$mrna_expression_as_cell_line_fraction and data25_mpm$mrna_expression_as_cell_line_fraction
t = 3.4307, df = 1.0128, p-value = 0.178
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 -1.820878  3.224501
sample estimates:
 mean of x  mean of y 
0.74537175 0.04356043 

data25_ctl = data24[(data24$cellline=="MET5A")&(data24$mrna=="BCRP (ABCG2)"),]
data25_mpm = data24[(data24$cellline!="MET5A")&(data24$mrna=="BCRP (ABCG2)"),]
data25 = rbind( data25_ctl, data25_mpm )
data25$mpm_or_ctl = ifelse( (data25$cellline=="MET5A"), "control", "MPM" )
ggplot(data25, aes(x=cellline, y=mrna_expression_as_cell_line_fraction, color=cellline)) + geom_point() + ggtitle("BCRP (ABCG2)")
ggsave( "figure3a_BCRP_scatter.png", plot=last_plot() )
ggplot(data25, aes(x=mrna_expression_as_cell_line_fraction, colour=mpm_or_ctl)) + 
  geom_histogram(aes(y=..density..), fill="white") + geom_density(alpha=.2) + ggtitle("BCRP (ABCG2)")
ggsave( "figure3a_BCRP_histogram.png", plot=last_plot() )
t.test( x=data25_ctl$mrna_expression_as_cell_line_fraction, y=data25_mpm$mrna_expression_as_cell_line_fraction )
	Welch Two Sample t-test
data:  data25_ctl$mrna_expression_as_cell_line_fraction and data25_mpm$mrna_expression_as_cell_line_fraction
t = 33.061, df = 1.2611, p-value = 0.008294
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 0.6827208 1.1116697
sample estimates:
mean of x mean of y 
0.9236840 0.0264887

data25_ctl = data24[(data24$cellline=="MET5A")&(data24$mrna=="IAP1"),]
data25_mpm = data24[(data24$cellline!="MET5A")&(data24$mrna=="IAP1"),]
data25 = rbind( data25_ctl, data25_mpm )
data25$mpm_or_ctl = ifelse( (data25$cellline=="MET5A"), "control", "MPM" )
ggplot(data25, aes(x=cellline, y=mrna_expression_as_cell_line_fraction, color=cellline)) + geom_point() + ggtitle("IAP1")
ggsave( "figure3a_IAP1_scatter.png", plot=last_plot() )
ggplot(data25, aes(x=mrna_expression_as_cell_line_fraction, colour=mpm_or_ctl)) + 
  geom_histogram(aes(y=..density..), fill="white") + geom_density(alpha=.2) + ggtitle("IAP1")
ggsave( "figure3a_IAP1_histogram.png", plot=last_plot() )
t.test( x=data25_ctl$mrna_expression_as_cell_line_fraction, y=data25_mpm$mrna_expression_as_cell_line_fraction )
	Welch Two Sample t-test
data:  data25_ctl$mrna_expression_as_cell_line_fraction and data25_mpm$mrna_expression_as_cell_line_fraction
t = 1.287, df = 1.0119, p-value = 0.4186
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 -4.251307  5.239623
sample estimates:
 mean of x  mean of y 
0.56646149 0.07230327 

data25_ctl = data24[(data24$cellline=="MET5A")&(data24$mrna=="IAP2"),]
data25_mpm = data24[(data24$cellline!="MET5A")&(data24$mrna=="IAP2"),]
data25 = rbind( data25_ctl, data25_mpm )
data25$mpm_or_ctl = ifelse( (data25$cellline=="MET5A"), "control", "MPM" )
ggplot(data25, aes(x=cellline, y=mrna_expression_as_cell_line_fraction, color=cellline)) + geom_point() + ggtitle("IAP2")
ggsave( "figure3a_IAP2_scatter.png", plot=last_plot() )
ggplot(data25, aes(x=mrna_expression_as_cell_line_fraction, colour=mpm_or_ctl)) + 
  geom_histogram(aes(y=..density..), fill="white") + geom_density(alpha=.2) + ggtitle("IAP2")
ggsave( "figure3a_IAP2_histogram.png", plot=last_plot() )
t.test( x=data25_ctl$mrna_expression_as_cell_line_fraction, y=data25_mpm$mrna_expression_as_cell_line_fraction )
	Welch Two Sample t-test
data:  data25_ctl$mrna_expression_as_cell_line_fraction and data25_mpm$mrna_expression_as_cell_line_fraction
t = -2.4133, df = 19.164, p-value = 0.02598
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 -2.9585965 -0.2111473
sample estimates:
mean of x mean of y 
0.9053917 2.4902636 

data25_ctl = data24[(data24$cellline=="MET5A")&(data24$mrna=="ILF3"),]
data25_mpm = data24[(data24$cellline!="MET5A")&(data24$mrna=="ILF3"),]
data25 = rbind( data25_ctl, data25_mpm )
data25$mpm_or_ctl = ifelse( (data25$cellline=="MET5A"), "control", "MPM" )
ggplot(data25, aes(x=cellline, y=mrna_expression_as_cell_line_fraction, color=cellline)) + geom_point() + ggtitle("ILF3")
ggsave( "figure3a_ILF3_scatter.png", plot=last_plot() )
ggplot(data25, aes(x=mrna_expression_as_cell_line_fraction, colour=mpm_or_ctl)) + 
  geom_histogram(aes(y=..density..), fill="white") + geom_density(alpha=.2) + ggtitle("ILF3")
ggsave( "figure3a_ILF3_histogram.png", plot=last_plot() )
t.test( x=data25_ctl$mrna_expression_as_cell_line_fraction, y=data25_mpm$mrna_expression_as_cell_line_fraction )
	Welch Two Sample t-test
data:  data25_ctl$mrna_expression_as_cell_line_fraction and data25_mpm$mrna_expression_as_cell_line_fraction
t = 2.6342, df = 1.0017, p-value = 0.2306
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 -2.553894  3.896554
sample estimates:
 mean of x  mean of y 
0.69454312 0.02321317 

data25_ctl = data24[(data24$cellline=="MET5A")&(data24$mrna=="Birc5"),]
data25_mpm = data24[(data24$cellline!="MET5A")&(data24$mrna=="Birc5"),]
data25 = rbind( data25_ctl, data25_mpm )
data25$mpm_or_ctl = ifelse( (data25$cellline=="MET5A"), "control", "MPM" )
ggplot(data25, aes(x=cellline, y=mrna_expression_as_cell_line_fraction, color=cellline)) + geom_point() + ggtitle("Birc5")
ggsave( "figure3a_Birc5_scatter.png", plot=last_plot() )
ggplot(data25, aes(x=mrna_expression_as_cell_line_fraction, colour=mpm_or_ctl)) + 
  geom_histogram(aes(y=..density..), fill="white") + geom_density(alpha=.2) + ggtitle("Birc5")
ggsave( "figure3a_Birc5_histogram.png", plot=last_plot() )
t.test( x=data25_ctl$mrna_expression_as_cell_line_fraction, y=data25_mpm$mrna_expression_as_cell_line_fraction )
	Welch Two Sample t-test
data:  data25_ctl$mrna_expression_as_cell_line_fraction and data25_mpm$mrna_expression_as_cell_line_fraction
t = 69.862, df = 3.1166, p-value = 4.386e-06
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 0.8733817 0.9549327
sample estimates:
 mean of x  mean of y 
0.93951902 0.02536179

data25_ctl = data24[(data24$cellline=="MET5A")&(data24$mrna=="ABCG2"),]
data25_mpm = data24[(data24$cellline!="MET5A")&(data24$mrna=="ABCG2"),]
data25 = rbind( data25_ctl, data25_mpm )
data25$mpm_or_ctl = ifelse( (data25$cellline=="MET5A"), "control", "MPM" )
ggplot(data25, aes(x=cellline, y=mrna_expression_as_cell_line_fraction, color=cellline)) + geom_point() + ggtitle("ABCG2")
ggsave( "figure3a_ABCG2_scatter.png", plot=last_plot() )
ggplot(data25, aes(x=mrna_expression_as_cell_line_fraction, colour=mpm_or_ctl)) + 
  geom_histogram(aes(y=..density..), fill="white") + geom_density(alpha=.2) + ggtitle("ABCG2")
ggsave( "figure3a_ABCG2_histogram.png", plot=last_plot() )
t.test( x=data25_ctl$mrna_expression_as_cell_line_fraction, y=data25_mpm$mrna_expression_as_cell_line_fraction )
	Welch Two Sample t-test
data:  data25_ctl$mrna_expression_as_cell_line_fraction and data25_mpm$mrna_expression_as_cell_line_fraction
t = 4.4283, df = 1.1428, p-value = 0.1177
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 -0.8016682  2.1999703
sample estimates:
 mean of x  mean of y 
0.79659529 0.09744422 

data25_ctl = data24[(data24$cellline=="MET5A")&(data24$mrna=="XIAP"),]
data25_mpm = data24[(data24$cellline!="MET5A")&(data24$mrna=="XIAP"),]
data25 = rbind( data25_ctl, data25_mpm )
data25$mpm_or_ctl = ifelse( (data25$cellline=="MET5A"), "control", "MPM" )
ggplot(data25, aes(x=cellline, y=mrna_expression_as_cell_line_fraction, color=cellline)) + geom_point() + ggtitle("XIAP")
ggsave( "figure3a_XIAP_scatter.png", plot=last_plot() )
ggplot(data25, aes(x=mrna_expression_as_cell_line_fraction, colour=mpm_or_ctl)) + 
  geom_histogram(aes(y=..density..), fill="white") + geom_density(alpha=.2) + ggtitle("XIAP")
ggsave( "figure3a_XIAP_histogram.png", plot=last_plot() )
t.test( x=data25_ctl$mrna_expression_as_cell_line_fraction, y=data25_mpm$mrna_expression_as_cell_line_fraction )
	Welch Two Sample t-test
data:  data25_ctl$mrna_expression_as_cell_line_fraction and data25_mpm$mrna_expression_as_cell_line_fraction
t = 3.3713, df = 1.0138, p-value = 0.1809
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 -1.828087  3.207713
sample estimates:
 mean of x  mean of y 
0.74537175 0.05555873 


########## Is there a correlation between the upregulation of ABCA6 and ABCA10 in a cell line and the cell line's sensitivity to YM155
########## Figure 3B
########## Table 4

### read in ABCA6/ABCA10 levels for cell lines

data30 = read.table("data_figure3b_ABCA6_ABCA10.txt", sep = "\t", header = TRUE)

data30$experiment = as.character(data30$experiment)
data30$fold_change = as.numeric(as.character(data30$fold_change))

data30_abca6 = data30[(data30$gene=="ABCA6"),]
data30_abca10 = data30[(data30$gene=="ABCA10"),]

ggplot(data30, aes(x=gene, y=fold_change, color=cellline)) + geom_point(position="jitter") + scale_y_log10()
ggsave( "figure3b_gene_cellline.png", plot=last_plot() )

ggplot(data30, aes(x=cellline, y=fold_change, color=gene)) + geom_point(position="jitter") + scale_y_log10()
ggsave( "figure3b_cellline_gene.png", plot=last_plot() )

### read in cell line sensitivities to YM155

data40 = read.table("data_figure2a_ym155_02.txt", sep = "\t", header = TRUE)

data40$experiment = as.character(data40$experiment)
data40$dose = as.numeric(as.character(data40$dose))
data40$log10_dose = log10(data40$dose)
data40$cellline = ifelse( (data40$cellline=="MSTO_211H"), "MSTO", data40$cellline )

ggplot(data40, aes(x=log10_dose, y=viability, color=cellline)) + geom_point() + geom_line(aes(x=log10_dose, y=viability, color=cellline))

ggplot(data40, aes(x=log10_dose, y=viability, color=cellline)) + geom_point() + facet_wrap(~cellline)


### Work out the IC50 for each cell line for YM155 treatment

data40b = data40
colnames(data40b)[colnames(data40b) == 'viability'] = 'growth' # the model_ic50_and_stdev.1component function expects column "growth" not "viability"

###
assign_start_lower_upper_values_MET5A_YM155 = function()
{
	A_start = 100;          A_low = 30;              A_high = 120;
	B_start = 5;            B_low = -10;             B_high = 40;
	scal_start = 0.1;       scal_low = -Inf;         scal_high = Inf;
	xmid_start = 0.3;        xmid_low = -2;           xmid_high = 4;
	xshift_start = 0.1;     xshift_low = -1;         xshift_high = 2;
	sigma_start = 0.1;      sigma_low = 1e-4;        sigma_high = Inf;

	start.1component   = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   sigma=sigma_start)
	lower.1component   = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     sigma=sigma_low)
	upper.1component   = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    sigma=sigma_high)
	assign("start.1component", start.1component, envir = .GlobalEnv)
	assign("lower.1component", lower.1component, envir = .GlobalEnv)
	assign("upper.1component", upper.1component, envir = .GlobalEnv)
	assign("start2.1component", start2.1component, envir = .GlobalEnv)

	start.2component = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   xshift=xshift_start,   sigma=sigma_start)
	lower.2component = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     xshift=xshift_low,     sigma=sigma_low)
	upper.2component = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    xshift=xshift_high,    sigma=sigma_high)
	assign("start.2component", start.2component, envir = .GlobalEnv)
	assign("lower.2component", lower.2component, envir = .GlobalEnv)
	assign("upper.2component", upper.2component, envir = .GlobalEnv)
}
assign_start_lower_upper_values_MET5A_YM155()

data41 = data40b[(data40b$cellline == "MET5A"),]
MET5A_YM155_fit.1component = model_ic50_and_stdev.1component(data41)

A = MET5A_YM155_fit.1component$model$A
B = MET5A_YM155_fit.1component$model$B
scal = MET5A_YM155_fit.1component$model$scal
xmid = MET5A_YM155_fit.1component$model$xmid
data3 = data41[(data41$experiment=="1") ,c("cellline", "dose", "drug", "log10_dose")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig2a_MET5A_YM155_with_1component_model_fitted_line_log.png'
ggplot(data41, aes(x=log10_dose, y=growth, col=cellline)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

MET5A_YM155_TC50 = MET5A_YM155_fit.1component$IC50

###
assign_start_lower_upper_values_H28_YM155 = function()
{
	A_start = 100;          A_low = 30;              A_high = 120;
	B_start = 5;            B_low = -10;             B_high = 40;
	scal_start = 0.1;       scal_low = -Inf;         scal_high = Inf;
	xmid_start = 0.3;        xmid_low = -2;           xmid_high = 4;
	xshift_start = 0.1;     xshift_low = -1;         xshift_high = 2;
	sigma_start = 0.1;      sigma_low = 1e-4;        sigma_high = Inf;

	start.1component   = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   sigma=sigma_start)
	lower.1component   = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     sigma=sigma_low)
	upper.1component   = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    sigma=sigma_high)
	assign("start.1component", start.1component, envir = .GlobalEnv)
	assign("lower.1component", lower.1component, envir = .GlobalEnv)
	assign("upper.1component", upper.1component, envir = .GlobalEnv)
	assign("start2.1component", start2.1component, envir = .GlobalEnv)

	start.2component = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   xshift=xshift_start,   sigma=sigma_start)
	lower.2component = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     xshift=xshift_low,     sigma=sigma_low)
	upper.2component = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    xshift=xshift_high,    sigma=sigma_high)
	assign("start.2component", start.2component, envir = .GlobalEnv)
	assign("lower.2component", lower.2component, envir = .GlobalEnv)
	assign("upper.2component", upper.2component, envir = .GlobalEnv)
}
assign_start_lower_upper_values_H28_YM155()

data41 = data40b[(data40b$cellline == "H28"),]
H28_YM155_fit.1component = model_ic50_and_stdev.1component(data41)

A = H28_YM155_fit.1component$model$A
B = H28_YM155_fit.1component$model$B
scal = H28_YM155_fit.1component$model$scal
xmid = H28_YM155_fit.1component$model$xmid
data3 = data41[(data41$experiment=="1") ,c("cellline", "dose", "drug", "log10_dose")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig2a_H28_YM155_with_1component_model_fitted_line_log.png'
ggplot(data41, aes(x=log10_dose, y=growth, col=cellline)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

H28_YM155_TC50 = H28_YM155_fit.1component$IC50

###
assign_start_lower_upper_values_H226_YM155 = function()
{
	A_start = 100;          A_low = 30;              A_high = 120;
	B_start = 5;            B_low = -10;             B_high = 40;
	scal_start = 0.1;       scal_low = -Inf;         scal_high = Inf;
	xmid_start = 0.3;        xmid_low = -2;           xmid_high = 4;
	xshift_start = 0.1;     xshift_low = -1;         xshift_high = 2;
	sigma_start = 0.1;      sigma_low = 1e-4;        sigma_high = Inf;

	start.1component   = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   sigma=sigma_start)
	lower.1component   = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     sigma=sigma_low)
	upper.1component   = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    sigma=sigma_high)
	assign("start.1component", start.1component, envir = .GlobalEnv)
	assign("lower.1component", lower.1component, envir = .GlobalEnv)
	assign("upper.1component", upper.1component, envir = .GlobalEnv)
	assign("start2.1component", start2.1component, envir = .GlobalEnv)

	start.2component = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   xshift=xshift_start,   sigma=sigma_start)
	lower.2component = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     xshift=xshift_low,     sigma=sigma_low)
	upper.2component = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    xshift=xshift_high,    sigma=sigma_high)
	assign("start.2component", start.2component, envir = .GlobalEnv)
	assign("lower.2component", lower.2component, envir = .GlobalEnv)
	assign("upper.2component", upper.2component, envir = .GlobalEnv)
}
assign_start_lower_upper_values_H226_YM155()

data41 = data40b[(data40b$cellline == "H226"),]
H226_YM155_fit.1component = model_ic50_and_stdev.1component(data41)

A = H226_YM155_fit.1component$model$A
B = H226_YM155_fit.1component$model$B
scal = H226_YM155_fit.1component$model$scal
xmid = H226_YM155_fit.1component$model$xmid
data3 = data41[(data41$experiment=="1") ,c("cellline", "dose", "drug", "log10_dose")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig2a_H226_YM155_with_1component_model_fitted_line_log.png'
ggplot(data41, aes(x=log10_dose, y=growth, col=cellline)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

H226_YM155_TC50 = H226_YM155_fit.1component$IC50

###
assign_start_lower_upper_values_H2052_YM155 = function()
{
	A_start = 100;          A_low = 30;              A_high = 120;
	B_start = 5;            B_low = -10;             B_high = 40;
	scal_start = 0.1;       scal_low = -Inf;         scal_high = Inf;
	xmid_start = 0.8;        xmid_low = -2;           xmid_high = 4;
	xshift_start = 0.1;     xshift_low = -1;         xshift_high = 2;
	sigma_start = 0.1;      sigma_low = 1e-4;        sigma_high = Inf;

	start.1component   = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   sigma=sigma_start)
	lower.1component   = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     sigma=sigma_low)
	upper.1component   = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    sigma=sigma_high)
	assign("start.1component", start.1component, envir = .GlobalEnv)
	assign("lower.1component", lower.1component, envir = .GlobalEnv)
	assign("upper.1component", upper.1component, envir = .GlobalEnv)
	assign("start2.1component", start2.1component, envir = .GlobalEnv)

	start.2component = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   xshift=xshift_start,   sigma=sigma_start)
	lower.2component = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     xshift=xshift_low,     sigma=sigma_low)
	upper.2component = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    xshift=xshift_high,    sigma=sigma_high)
	assign("start.2component", start.2component, envir = .GlobalEnv)
	assign("lower.2component", lower.2component, envir = .GlobalEnv)
	assign("upper.2component", upper.2component, envir = .GlobalEnv)
}
assign_start_lower_upper_values_H2052_YM155()

data41 = data40b[(data40b$cellline == "H2052"),]
H2052_YM155_fit.1component = model_ic50_and_stdev.1component(data41)

A = H2052_YM155_fit.1component$model$A
B = H2052_YM155_fit.1component$model$B
scal = H2052_YM155_fit.1component$model$scal
xmid = H2052_YM155_fit.1component$model$xmid
data3 = data41[(data41$experiment=="1") ,c("cellline", "dose", "drug", "log10_dose")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig2a_H2052_YM155_with_1component_model_fitted_line_log.png'
ggplot(data41, aes(x=log10_dose, y=growth, col=cellline)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

H2052_YM155_TC50 = H2052_YM155_fit.1component$IC50

###
assign_start_lower_upper_values_H2452_YM155 = function()
{
	A_start = 100;          A_low = 30;              A_high = 120;
	B_start = 5;            B_low = -10;             B_high = 40;
	scal_start = 0.1;       scal_low = -Inf;         scal_high = Inf;
	xmid_start = 0.8;        xmid_low = -2;           xmid_high = 4;
	xshift_start = 0.1;     xshift_low = -1;         xshift_high = 2;
	sigma_start = 0.1;      sigma_low = 1e-4;        sigma_high = Inf;

	start.1component   = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   sigma=sigma_start)
	lower.1component   = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     sigma=sigma_low)
	upper.1component   = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    sigma=sigma_high)
	assign("start.1component", start.1component, envir = .GlobalEnv)
	assign("lower.1component", lower.1component, envir = .GlobalEnv)
	assign("upper.1component", upper.1component, envir = .GlobalEnv)
	assign("start2.1component", start2.1component, envir = .GlobalEnv)

	start.2component = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   xshift=xshift_start,   sigma=sigma_start)
	lower.2component = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     xshift=xshift_low,     sigma=sigma_low)
	upper.2component = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    xshift=xshift_high,    sigma=sigma_high)
	assign("start.2component", start.2component, envir = .GlobalEnv)
	assign("lower.2component", lower.2component, envir = .GlobalEnv)
	assign("upper.2component", upper.2component, envir = .GlobalEnv)
}
assign_start_lower_upper_values_H2452_YM155()

data41 = data40b[(data40b$cellline == "H2452"),]
H2452_YM155_fit.1component = model_ic50_and_stdev.1component(data41)

A = H2452_YM155_fit.1component$model$A
B = H2452_YM155_fit.1component$model$B
scal = H2452_YM155_fit.1component$model$scal
xmid = H2452_YM155_fit.1component$model$xmid
data3 = data41[(data41$experiment=="1") ,c("cellline", "dose", "drug", "log10_dose")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig2a_H2452_YM155_with_1component_model_fitted_line_log.png'
ggplot(data41, aes(x=log10_dose, y=growth, col=cellline)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

H2452_YM155_TC50 = H2452_YM155_fit.1component$IC50

###
assign_start_lower_upper_values_MM05_YM155 = function()
{
	A_start = 100;          A_low = 30;              A_high = 120;
	B_start = 5;            B_low = -10;             B_high = 40;
	scal_start = 0.1;       scal_low = -Inf;         scal_high = Inf;
	xmid_start = 0.3;        xmid_low = -2;           xmid_high = 4;
	xshift_start = 0.1;     xshift_low = -1;         xshift_high = 2;
	sigma_start = 0.1;      sigma_low = 1e-4;        sigma_high = Inf;

	start.1component   = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   sigma=sigma_start)
	lower.1component   = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     sigma=sigma_low)
	upper.1component   = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    sigma=sigma_high)
	assign("start.1component", start.1component, envir = .GlobalEnv)
	assign("lower.1component", lower.1component, envir = .GlobalEnv)
	assign("upper.1component", upper.1component, envir = .GlobalEnv)
	assign("start2.1component", start2.1component, envir = .GlobalEnv)

	start.2component = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   xshift=xshift_start,   sigma=sigma_start)
	lower.2component = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     xshift=xshift_low,     sigma=sigma_low)
	upper.2component = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    xshift=xshift_high,    sigma=sigma_high)
	assign("start.2component", start.2component, envir = .GlobalEnv)
	assign("lower.2component", lower.2component, envir = .GlobalEnv)
	assign("upper.2component", upper.2component, envir = .GlobalEnv)
}
assign_start_lower_upper_values_MM05_YM155()

data41 = data40b[(data40b$cellline == "MM05"),]
MM05_YM155_fit.1component = model_ic50_and_stdev.1component(data41)

A = MM05_YM155_fit.1component$model$A
B = MM05_YM155_fit.1component$model$B
scal = MM05_YM155_fit.1component$model$scal
xmid = MM05_YM155_fit.1component$model$xmid
data3 = data41[(data41$experiment=="1") ,c("cellline", "dose", "drug", "log10_dose")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig2a_MM05_YM155_with_1component_model_fitted_line_log.png'
ggplot(data41, aes(x=log10_dose, y=growth, col=cellline)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

MM05_YM155_TC50 = MM05_YM155_fit.1component$IC50

###
assign_start_lower_upper_values_MSTO_YM155 = function()
{
	A_start = 100;          A_low = 30;              A_high = 120;
	B_start = 5;            B_low = -10;             B_high = 40;
	scal_start = 0.1;       scal_low = -Inf;         scal_high = Inf;
	xmid_start = 0.3;        xmid_low = -2;           xmid_high = 4;
	xshift_start = 0.1;     xshift_low = -1;         xshift_high = 2;
	sigma_start = 0.1;      sigma_low = 1e-4;        sigma_high = Inf;

	start.1component   = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   sigma=sigma_start)
	lower.1component   = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     sigma=sigma_low)
	upper.1component   = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    sigma=sigma_high)
	assign("start.1component", start.1component, envir = .GlobalEnv)
	assign("lower.1component", lower.1component, envir = .GlobalEnv)
	assign("upper.1component", upper.1component, envir = .GlobalEnv)
	assign("start2.1component", start2.1component, envir = .GlobalEnv)

	start.2component = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   xshift=xshift_start,   sigma=sigma_start)
	lower.2component = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     xshift=xshift_low,     sigma=sigma_low)
	upper.2component = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    xshift=xshift_high,    sigma=sigma_high)
	assign("start.2component", start.2component, envir = .GlobalEnv)
	assign("lower.2component", lower.2component, envir = .GlobalEnv)
	assign("upper.2component", upper.2component, envir = .GlobalEnv)
}
assign_start_lower_upper_values_MSTO_YM155()

data41 = data40b[(data40b$cellline == "MSTO"),]
MSTO_YM155_fit.1component = model_ic50_and_stdev.1component(data41)

A = MSTO_YM155_fit.1component$model$A
B = MSTO_YM155_fit.1component$model$B
scal = MSTO_YM155_fit.1component$model$scal
xmid = MSTO_YM155_fit.1component$model$xmid
data3 = data41[(data41$experiment=="1") ,c("cellline", "dose", "drug", "log10_dose")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig2a_MSTO_YM155_with_1component_model_fitted_line_log.png'
ggplot(data41, aes(x=log10_dose, y=growth, col=cellline)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

MSTO_YM155_TC50 = MSTO_YM155_fit.1component$IC50

###
assign_start_lower_upper_values_Ren_YM155 = function()
{
	A_start = 100;          A_low = 30;              A_high = 120;
	B_start = 5;            B_low = -10;             B_high = 40;
	scal_start = 0.1;       scal_low = -Inf;         scal_high = Inf;
	xmid_start = 0.3;        xmid_low = -2;           xmid_high = 4;
	xshift_start = 0.1;     xshift_low = -1;         xshift_high = 2;
	sigma_start = 0.1;      sigma_low = 1e-4;        sigma_high = Inf;

	start.1component   = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   sigma=sigma_start)
	lower.1component   = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     sigma=sigma_low)
	upper.1component   = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    sigma=sigma_high)
	assign("start.1component", start.1component, envir = .GlobalEnv)
	assign("lower.1component", lower.1component, envir = .GlobalEnv)
	assign("upper.1component", upper.1component, envir = .GlobalEnv)
	assign("start2.1component", start2.1component, envir = .GlobalEnv)

	start.2component = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   xshift=xshift_start,   sigma=sigma_start)
	lower.2component = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     xshift=xshift_low,     sigma=sigma_low)
	upper.2component = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    xshift=xshift_high,    sigma=sigma_high)
	assign("start.2component", start.2component, envir = .GlobalEnv)
	assign("lower.2component", lower.2component, envir = .GlobalEnv)
	assign("upper.2component", upper.2component, envir = .GlobalEnv)
}
assign_start_lower_upper_values_Ren_YM155()

data41 = data40b[(data40b$cellline == "Ren"),]
Ren_YM155_fit.1component = model_ic50_and_stdev.1component(data41)

A = Ren_YM155_fit.1component$model$A
B = Ren_YM155_fit.1component$model$B
scal = Ren_YM155_fit.1component$model$scal
xmid = Ren_YM155_fit.1component$model$xmid
data3 = data41[(data41$experiment=="1") ,c("cellline", "dose", "drug", "log10_dose")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig2a_Ren_YM155_with_1component_model_fitted_line_log.png'
ggplot(data41, aes(x=log10_dose, y=growth, col=cellline)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

Ren_YM155_TC50 = Ren_YM155_fit.1component$IC50

###
assign_start_lower_upper_values_VMC20_YM155 = function()
{
	A_start = 100;          A_low = 30;              A_high = 120;
	B_start = 5;            B_low = -10;             B_high = 40;
	scal_start = 0.1;       scal_low = -Inf;         scal_high = Inf;
	xmid_start = 0.3;        xmid_low = -2;           xmid_high = 4;
	xshift_start = 0.1;     xshift_low = -1;         xshift_high = 2;
	sigma_start = 0.1;      sigma_low = 1e-4;        sigma_high = Inf;

	start.1component   = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   sigma=sigma_start)
	lower.1component   = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     sigma=sigma_low)
	upper.1component   = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    sigma=sigma_high)
	assign("start.1component", start.1component, envir = .GlobalEnv)
	assign("lower.1component", lower.1component, envir = .GlobalEnv)
	assign("upper.1component", upper.1component, envir = .GlobalEnv)
	assign("start2.1component", start2.1component, envir = .GlobalEnv)

	start.2component = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   xshift=xshift_start,   sigma=sigma_start)
	lower.2component = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     xshift=xshift_low,     sigma=sigma_low)
	upper.2component = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    xshift=xshift_high,    sigma=sigma_high)
	assign("start.2component", start.2component, envir = .GlobalEnv)
	assign("lower.2component", lower.2component, envir = .GlobalEnv)
	assign("upper.2component", upper.2component, envir = .GlobalEnv)
}
assign_start_lower_upper_values_VMC20_YM155()

data41 = data40b[(data40b$cellline == "VMC20"),]
VMC20_YM155_fit.1component = model_ic50_and_stdev.1component(data41)

A = VMC20_YM155_fit.1component$model$A
B = VMC20_YM155_fit.1component$model$B
scal = VMC20_YM155_fit.1component$model$scal
xmid = VMC20_YM155_fit.1component$model$xmid
data3 = data41[(data41$experiment=="1") ,c("cellline", "dose", "drug", "log10_dose")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig2a_VMC20_YM155_with_1component_model_fitted_line_log.png'
ggplot(data41, aes(x=log10_dose, y=growth, col=cellline)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

VMC20_YM155_TC50 = VMC20_YM155_fit.1component$IC50

###
assign_start_lower_upper_values_VMC23_YM155 = function()
{
	A_start = 100;          A_low = 30;              A_high = 120;
	B_start = 5;            B_low = -10;             B_high = 40;
	scal_start = 0.1;       scal_low = -Inf;         scal_high = Inf;
	xmid_start = 0.3;        xmid_low = -2;           xmid_high = 4;
	xshift_start = 0.1;     xshift_low = -1;         xshift_high = 2;
	sigma_start = 0.1;      sigma_low = 1e-4;        sigma_high = Inf;

	start.1component   = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   sigma=sigma_start)
	lower.1component   = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     sigma=sigma_low)
	upper.1component   = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    sigma=sigma_high)
	assign("start.1component", start.1component, envir = .GlobalEnv)
	assign("lower.1component", lower.1component, envir = .GlobalEnv)
	assign("upper.1component", upper.1component, envir = .GlobalEnv)
	assign("start2.1component", start2.1component, envir = .GlobalEnv)

	start.2component = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   xshift=xshift_start,   sigma=sigma_start)
	lower.2component = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     xshift=xshift_low,     sigma=sigma_low)
	upper.2component = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    xshift=xshift_high,    sigma=sigma_high)
	assign("start.2component", start.2component, envir = .GlobalEnv)
	assign("lower.2component", lower.2component, envir = .GlobalEnv)
	assign("upper.2component", upper.2component, envir = .GlobalEnv)
}
assign_start_lower_upper_values_VMC23_YM155()

data41 = data40b[(data40b$cellline == "VMC23"),]
VMC23_YM155_fit.1component = model_ic50_and_stdev.1component(data41)

A = VMC23_YM155_fit.1component$model$A
B = VMC23_YM155_fit.1component$model$B
scal = VMC23_YM155_fit.1component$model$scal
xmid = VMC23_YM155_fit.1component$model$xmid
data3 = data41[(data41$experiment=="1") ,c("cellline", "dose", "drug", "log10_dose")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig2a_VMC23_YM155_with_1component_model_fitted_line_log.png'
ggplot(data41, aes(x=log10_dose, y=growth, col=cellline)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

VMC23_YM155_TC50 = VMC23_YM155_fit.1component$IC50

###
assign_start_lower_upper_values_VMC40_YM155 = function()
{
	A_start = 100;          A_low = 30;              A_high = 120;
	B_start = 5;            B_low = -10;             B_high = 40;
	scal_start = 0.1;       scal_low = -Inf;         scal_high = Inf;
	xmid_start = 0.3;        xmid_low = -2;           xmid_high = 4;
	xshift_start = 0.1;     xshift_low = -1;         xshift_high = 2;
	sigma_start = 0.1;      sigma_low = 1e-4;        sigma_high = Inf;

	start.1component   = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   sigma=sigma_start)
	lower.1component   = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     sigma=sigma_low)
	upper.1component   = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    sigma=sigma_high)
	assign("start.1component", start.1component, envir = .GlobalEnv)
	assign("lower.1component", lower.1component, envir = .GlobalEnv)
	assign("upper.1component", upper.1component, envir = .GlobalEnv)
	assign("start2.1component", start2.1component, envir = .GlobalEnv)

	start.2component = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   xshift=xshift_start,   sigma=sigma_start)
	lower.2component = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     xshift=xshift_low,     sigma=sigma_low)
	upper.2component = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    xshift=xshift_high,    sigma=sigma_high)
	assign("start.2component", start.2component, envir = .GlobalEnv)
	assign("lower.2component", lower.2component, envir = .GlobalEnv)
	assign("upper.2component", upper.2component, envir = .GlobalEnv)
}
assign_start_lower_upper_values_VMC40_YM155()

data41 = data40b[(data40b$cellline == "VMC40"),]
VMC40_YM155_fit.1component = model_ic50_and_stdev.1component(data41)

A = VMC40_YM155_fit.1component$model$A
B = VMC40_YM155_fit.1component$model$B
scal = VMC40_YM155_fit.1component$model$scal
xmid = VMC40_YM155_fit.1component$model$xmid
data3 = data41[(data41$experiment=="1") ,c("cellline", "dose", "drug", "log10_dose")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind( data3, data3, data3)
data3 = data3x3

plot_name = 'fig2a_VMC40_YM155_with_1component_model_fitted_line_log.png'
ggplot(data41, aes(x=log10_dose, y=growth, col=cellline)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

VMC40_YM155_TC50 = VMC40_YM155_fit.1component$IC50

###
data42 = matrix( c("MET5A",MET5A_YM155_TC50, "H28",H28_YM155_TC50, "H226",H226_YM155_TC50, "H2052",H2052_YM155_TC50, "H2452",H2452_YM155_TC50, "MM05",MM05_YM155_TC50, 
                   "MSTO",MSTO_YM155_TC50, "Ren",Ren_YM155_TC50, "VMC20",VMC20_YM155_TC50, "VMC23",VMC23_YM155_TC50, "VMC40",VMC40_YM155_TC50), nrow=2 )
data42 = as.data.frame(t(as.matrix(data42)))
colnames(data42) = c("cellline","IC50")
data42$IC50 = as.numeric(as.character(data42$IC50))

########## Figure 2A
########## YM155 IC50 for cell lines
 
data42
   cellline        IC50
1     MET5A   2.8312998
2       H28   1.2835603
3      H226   1.2521588
4     H2052   5.4490094
5     H2452   6.8291857
6      MM05 195.2214470
7      MSTO  22.2130461
8       Ren   0.4844685
9     VMC20   0.8300450
10    VMC23  19.1888001
11    VMC40   0.7706368


### correlation

data30_abca6 = data30[(data30$gene=="ABCA6"),]
data30_abca10 = data30[(data30$gene=="ABCA10"),]

data30_abca6_ym155_IC50 = merge( x=data30_abca6, y=data42, by=c("cellline"), all.x=FALSE, all.y=FALSE )
data30_abca10_ym155_IC50 = merge( x=data30_abca10, y=data42, by=c("cellline"), all.x=FALSE, all.y=FALSE )

data30_abca6_ym155_IC50$log10_fold_change = log10(data30_abca6_ym155_IC50$fold_change)
data30_abca6_ym155_IC50$log10_IC50 = log10(data30_abca6_ym155_IC50$IC50)
data30_abca10_ym155_IC50$log10_fold_change = log10(data30_abca10_ym155_IC50$fold_change)
data30_abca10_ym155_IC50$log10_IC50 = log10(data30_abca10_ym155_IC50$IC50)

plot_name = 'ABCA6_fold_change_vs_YM155_IC50.png'
ggplot(data30_abca6_ym155_IC50, aes(x=fold_change, y=IC50, col=cellline)) + geom_point() + scale_x_log10() + scale_y_log10() + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

cor.test( data30_abca6_ym155_IC50$fold_change, data30_abca6_ym155_IC50$IC50, alternative=c("two.sided"), method=c("pearson") )
	Pearson's product-moment correlation
data:  data30_abca6_ym155_IC50$fold_change and data30_abca6_ym155_IC50$IC50
t = 3.4607, df = 20, p-value = 0.00247
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
 0.2565944 0.8216102
sample estimates:
      cor 
0.6119957 

plot_name = 'ABCA10_fold_change_vs_YM155_IC50.png'
ggplot(data30_abca10_ym155_IC50, aes(x=fold_change, y=IC50, col=cellline)) + geom_point() + scale_x_log10() + scale_y_log10() + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

cor.test( data30_abca10_ym155_IC50$fold_change, data30_abca10_ym155_IC50$IC50, alternative=c("two.sided"), method=c("pearson") )
	Pearson's product-moment correlation
data:  data30_abca10_ym155_IC50$fold_change and data30_abca10_ym155_IC50$IC50
t = 9.6435, df = 20, p-value = 5.804e-09
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
 0.7863534 0.9611735
sample estimates:
      cor 
0.9071962 


# Conclusion: Figure 3B. There is a statistically significant correlation between cell line sensitivity to YM155 and fold-change of ABCA6 or ABCA10.


########## Is there a correlation between the upregulation of IAP genes (OCT1,MDR1,MRP1,IAP1,IAP2,ILF3,Birc5,ABCG2,XIAP) in a cell line and the cell line's sensitivity to YM155?
########## Figure 3A
########## MM05 has IC50 so high it is an outlier, try correlation with and without this outlier

###
data71 = sqldf("select cellline, mrna, avg(mrna_expression_as_cell_line_fraction) from data24 where mrna='OCT1' group by cellline, mrna")
names(data71)[names(data71) == 'avg(mrna_expression_as_cell_line_fraction)'] = 'mrna_expression_as_cell_line_fraction'
data72 = merge( x=data71, data42, by=c("cellline"), all.x=TRUE, all.y=TRUE )
ggplot(data72, aes(x=mrna_expression_as_cell_line_fraction, y=IC50, col=cellline)) + geom_point() + scale_x_log10()
cor.test( data72$mrna_expression_as_cell_line_fraction, data72$IC50, alternative=c("two.sided"), method=c("pearson") )
	Pearson's product-moment correlation
data:  data72$mrna_expression_as_cell_line_fraction and data72$IC50
t = -0.52533, df = 9, p-value = 0.612
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
 -0.6999385  0.4767144
sample estimates:
       cor 
-0.1724863 

data72b = data72[(data72$cellline!="MM05"),]
ggplot(data72b, aes(x=mrna_expression_as_cell_line_fraction, y=IC50, col=cellline)) + geom_point() + scale_x_log10()
cor.test( data72b$mrna_expression_as_cell_line_fraction, data72b$IC50, alternative=c("two.sided"), method=c("pearson") )
	Pearson's product-moment correlation
data:  data72b$mrna_expression_as_cell_line_fraction and data72b$IC50
t = -0.54617, df = 8, p-value = 0.5998
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
 -0.7318587  0.4996768
sample estimates:
       cor 
-0.1895992 

###
data71 = sqldf("select cellline, mrna, avg(mrna_expression_as_cell_line_fraction) from data24 where mrna='MDR1 (ABCB1)' group by cellline, mrna")
names(data71)[names(data71) == 'avg(mrna_expression_as_cell_line_fraction)'] = 'mrna_expression_as_cell_line_fraction'
data72 = merge( x=data71, data42, by=c("cellline"), all.x=TRUE, all.y=TRUE )
ggplot(data72, aes(x=mrna_expression_as_cell_line_fraction, y=IC50, col=cellline)) + geom_point() + scale_x_log10()
cor.test( data72$mrna_expression_as_cell_line_fraction, data72$IC50, alternative=c("two.sided"), method=c("pearson") )
	Pearson's product-moment correlation
data:  data72$mrna_expression_as_cell_line_fraction and data72$IC50
t = 0.93418, df = 9, p-value = 0.3746
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
 -0.3682375  0.7613930
sample estimates:
      cor 
0.2973129 

data72b = data72[(data72$cellline!="MM05"),]
ggplot(data72b, aes(x=mrna_expression_as_cell_line_fraction, y=IC50, col=cellline)) + geom_point() + scale_x_log10()
cor.test( data72b$mrna_expression_as_cell_line_fraction, data72b$IC50, alternative=c("two.sided"), method=c("pearson") )
	Pearson's product-moment correlation
data:  data72b$mrna_expression_as_cell_line_fraction and data72b$IC50
t = 1.3047, df = 8, p-value = 0.2283
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
 -0.2862516  0.8296820
sample estimates:
      cor 
0.4188679 

###
data71 = sqldf("select cellline, mrna, avg(mrna_expression_as_cell_line_fraction) from data24 where mrna='MRP1' group by cellline, mrna")
names(data71)[names(data71) == 'avg(mrna_expression_as_cell_line_fraction)'] = 'mrna_expression_as_cell_line_fraction'
data72 = merge( x=data71, data42, by=c("cellline"), all.x=TRUE, all.y=TRUE )
ggplot(data72, aes(x=mrna_expression_as_cell_line_fraction, y=IC50, col=cellline)) + geom_point() + scale_x_log10()
cor.test( data72$mrna_expression_as_cell_line_fraction, data72$IC50, alternative=c("two.sided"), method=c("pearson") )
	Pearson's product-moment correlation
data:  data72$mrna_expression_as_cell_line_fraction and data72$IC50
t = -0.026183, df = 9, p-value = 0.9797
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
 -0.6054328  0.5942588
sample estimates:
        cor 
-0.00872741

data72b = data72[(data72$cellline!="MM05"),]
ggplot(data72b, aes(x=mrna_expression_as_cell_line_fraction, y=IC50, col=cellline)) + geom_point() + scale_x_log10()
cor.test( data72b$mrna_expression_as_cell_line_fraction, data72b$IC50, alternative=c("two.sided"), method=c("pearson") )
	Pearson's product-moment correlation
data:  data72b$mrna_expression_as_cell_line_fraction and data72b$IC50
t = -0.45033, df = 8, p-value = 0.6644
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
 -0.7159806  0.5242951
sample estimates:
       cor 
-0.1572365

###
data71 = sqldf("select cellline, mrna, avg(mrna_expression_as_cell_line_fraction) from data24 where mrna='BCRP (ABCG2)' group by cellline, mrna")
names(data71)[names(data71) == 'avg(mrna_expression_as_cell_line_fraction)'] = 'mrna_expression_as_cell_line_fraction'
data72 = merge( x=data71, data42, by=c("cellline"), all.x=TRUE, all.y=TRUE )
ggplot(data72, aes(x=mrna_expression_as_cell_line_fraction, y=IC50, col=cellline)) + geom_point() + scale_x_log10()
cor.test( data72$mrna_expression_as_cell_line_fraction, data72$IC50, alternative=c("two.sided"), method=c("pearson") )
	Pearson's product-moment correlation
data:  data72$mrna_expression_as_cell_line_fraction and data72$IC50
t = -0.42268, df = 9, p-value = 0.6824
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
 -0.6822886  0.5024067
sample estimates:
       cor 
-0.1395157 

data72b = data72[(data72$cellline!="MM05"),]
ggplot(data72b, aes(x=mrna_expression_as_cell_line_fraction, y=IC50, col=cellline)) + geom_point() + scale_x_log10()
cor.test( data72b$mrna_expression_as_cell_line_fraction, data72b$IC50, alternative=c("two.sided"), method=c("pearson") )
	Pearson's product-moment correlation
data:  data72b$mrna_expression_as_cell_line_fraction and data72b$IC50
t = -0.54457, df = 8, p-value = 0.6009
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
 -0.7316002  0.5000942
sample estimates:
       cor 
-0.1890628 

###
data71 = sqldf("select cellline, mrna, avg(mrna_expression_as_cell_line_fraction) from data24 where mrna='IAP1' group by cellline, mrna")
names(data71)[names(data71) == 'avg(mrna_expression_as_cell_line_fraction)'] = 'mrna_expression_as_cell_line_fraction'
data72 = merge( x=data71, data42, by=c("cellline"), all.x=TRUE, all.y=TRUE )
ggplot(data72, aes(x=mrna_expression_as_cell_line_fraction, y=IC50, col=cellline)) + geom_point() + scale_x_log10()
cor.test( data72$mrna_expression_as_cell_line_fraction, data72$IC50, alternative=c("two.sided"), method=c("pearson") )
	Pearson's product-moment correlation
data:  data72$mrna_expression_as_cell_line_fraction and data72$IC50
t = -0.61118, df = 9, p-value = 0.5562
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
 -0.7139994  0.4546992
sample estimates:
       cor 
-0.1996265

data72b = data72[(data72$cellline!="MM05"),]
ggplot(data72b, aes(x=mrna_expression_as_cell_line_fraction, y=IC50, col=cellline)) + geom_point() + scale_x_log10()
cor.test( data72b$mrna_expression_as_cell_line_fraction, data72b$IC50, alternative=c("two.sided"), method=c("pearson") )
	Pearson's product-moment correlation
data:  data72b$mrna_expression_as_cell_line_fraction and data72b$IC50
t = -0.93952, df = 8, p-value = 0.375
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
 -0.7883826  0.3922447
sample estimates:
       cor 
-0.3152342 

###
data71 = sqldf("select cellline, mrna, avg(mrna_expression_as_cell_line_fraction) from data24 where mrna='IAP2' group by cellline, mrna")
names(data71)[names(data71) == 'avg(mrna_expression_as_cell_line_fraction)'] = 'mrna_expression_as_cell_line_fraction'
data72 = merge( x=data71, data42, by=c("cellline"), all.x=TRUE, all.y=TRUE )
ggplot(data72, aes(x=mrna_expression_as_cell_line_fraction, y=IC50, col=cellline)) + geom_point() + scale_x_log10()
cor.test( data72$mrna_expression_as_cell_line_fraction, data72$IC50, alternative=c("two.sided"), method=c("pearson") )
	Pearson's product-moment correlation
data:  data72$mrna_expression_as_cell_line_fraction and data72$IC50
t = -0.79481, df = 9, p-value = 0.4472
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
 -0.7419854  0.4061746
sample estimates:
       cor 
-0.2561003

###
data71 = sqldf("select cellline, mrna, avg(mrna_expression_as_cell_line_fraction) from data24 where mrna='ILF3' group by cellline, mrna")
names(data71)[names(data71) == 'avg(mrna_expression_as_cell_line_fraction)'] = 'mrna_expression_as_cell_line_fraction'
data72 = merge( x=data71, data42, by=c("cellline"), all.x=TRUE, all.y=TRUE )
ggplot(data72, aes(x=mrna_expression_as_cell_line_fraction, y=IC50, col=cellline)) + geom_point() + scale_x_log10()
cor.test( data72$mrna_expression_as_cell_line_fraction, data72$IC50, alternative=c("two.sided"), method=c("pearson") )
	Pearson's product-moment correlation
data:  data72$mrna_expression_as_cell_line_fraction and data72$IC50
t = -0.0074094, df = 9, p-value = 0.9942
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
 -0.6014537  0.5982916
sample estimates:
         cor 
-0.002469807

data72b = data72[(data72$cellline!="MM05"),]
ggplot(data72b, aes(x=mrna_expression_as_cell_line_fraction, y=IC50, col=cellline)) + geom_point() + scale_x_log10()
cor.test( data72b$mrna_expression_as_cell_line_fraction, data72b$IC50, alternative=c("two.sided"), method=c("pearson") )
	Pearson's product-moment correlation
data:  data72b$mrna_expression_as_cell_line_fraction and data72b$IC50
t = -1.0227, df = 8, p-value = 0.3364
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
 -0.7986710  0.3684789
sample estimates:
       cor 
-0.3400374

###
data71 = sqldf("select cellline, mrna, avg(mrna_expression_as_cell_line_fraction) from data24 where mrna='Birc5' group by cellline, mrna")
names(data71)[names(data71) == 'avg(mrna_expression_as_cell_line_fraction)'] = 'mrna_expression_as_cell_line_fraction'
data72 = merge( x=data71, data42, by=c("cellline"), all.x=TRUE, all.y=TRUE )
ggplot(data72, aes(x=mrna_expression_as_cell_line_fraction, y=IC50, col=cellline)) + geom_point() + scale_x_log10()
cor.test( data72$mrna_expression_as_cell_line_fraction, data72$IC50, alternative=c("two.sided"), method=c("pearson") )
	Pearson's product-moment correlation
data:  data72$mrna_expression_as_cell_line_fraction and data72$IC50
t = -0.43914, df = 9, p-value = 0.6709
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
 -0.6851812  0.4983347
sample estimates:
       cor 
-0.1448379  

data72b = data72[(data72$cellline!="MM05"),]
ggplot(data72b, aes(x=mrna_expression_as_cell_line_fraction, y=IC50, col=cellline)) + geom_point() + scale_x_log10()
cor.test( data72b$mrna_expression_as_cell_line_fraction, data72b$IC50, alternative=c("two.sided"), method=c("pearson") )
	Pearson's product-moment correlation
data:  data72b$mrna_expression_as_cell_line_fraction and data72b$IC50
t = -0.5691, df = 8, p-value = 0.5849
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
 -0.7355296  0.4936873
sample estimates:
       cor 
-0.1972528 

###
data71 = sqldf("select cellline, mrna, avg(mrna_expression_as_cell_line_fraction) from data24 where mrna='ABCG2' group by cellline, mrna")
names(data71)[names(data71) == 'avg(mrna_expression_as_cell_line_fraction)'] = 'mrna_expression_as_cell_line_fraction'
data72 = merge( x=data71, data42, by=c("cellline"), all.x=TRUE, all.y=TRUE )
ggplot(data72, aes(x=mrna_expression_as_cell_line_fraction, y=IC50, col=cellline)) + geom_point() + scale_x_log10()
cor.test( data72$mrna_expression_as_cell_line_fraction, data72$IC50, alternative=c("two.sided"), method=c("pearson") )
	Pearson's product-moment correlation
data:  data72$mrna_expression_as_cell_line_fraction and data72$IC50
t = -0.56794, df = 9, p-value = 0.584
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
 -0.7069956  0.4658466
sample estimates:
       cor 
-0.1860085  

data72b = data72[(data72$cellline!="MM05"),]
ggplot(data72b, aes(x=mrna_expression_as_cell_line_fraction, y=IC50, col=cellline)) + geom_point() + scale_x_log10()
cor.test( data72b$mrna_expression_as_cell_line_fraction, data72b$IC50, alternative=c("two.sided"), method=c("pearson") )
	Pearson's product-moment correlation
data:  data72b$mrna_expression_as_cell_line_fraction and data72b$IC50
t = -0.88796, df = 8, p-value = 0.4005
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
 -0.7817276  0.4068212
sample estimates:
       cor 
-0.2995277 

###
data71 = sqldf("select cellline, mrna, avg(mrna_expression_as_cell_line_fraction) from data24 where mrna='XIAP' group by cellline, mrna")
names(data71)[names(data71) == 'avg(mrna_expression_as_cell_line_fraction)'] = 'mrna_expression_as_cell_line_fraction'
data72 = merge( x=data71, data42, by=c("cellline"), all.x=TRUE, all.y=TRUE )
ggplot(data72, aes(x=mrna_expression_as_cell_line_fraction, y=IC50, col=cellline)) + geom_point() + scale_x_log10()
cor.test( data72$mrna_expression_as_cell_line_fraction, data72$IC50, alternative=c("two.sided"), method=c("pearson") )
	Pearson's product-moment correlation
data:  data72$mrna_expression_as_cell_line_fraction and data72$IC50
t = -0.44777, df = 9, p-value = 0.6649
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
 -0.6866878  0.4961929
sample estimates:
       cor 
-0.1476225 

data72b = data72[(data72$cellline!="MM05"),]
ggplot(data72b, aes(x=mrna_expression_as_cell_line_fraction, y=IC50, col=cellline)) + geom_point() + scale_x_log10()
cor.test( data72b$mrna_expression_as_cell_line_fraction, data72b$IC50, alternative=c("two.sided"), method=c("pearson") )
	Pearson's product-moment correlation
data:  data72b$mrna_expression_as_cell_line_fraction and data72b$IC50
t = -0.75653, df = 8, p-value = 0.471
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
 -0.7637608  0.4433671
sample estimates:
       cor 
-0.2583903 


# Conclusion: Figure 3A. There is not a statistically significant correlation between cell line sensitivity to YM155 and mRNA expression levels of the IAP-associated genes.


########## IC50 and statistical significance of siRNA
########## Figure 3C
########## Figure 3D

data50 = read.table("data_figure3c_figure3d_ABCA6_ABCA10.txt", sep = "\t", header = TRUE)

data50$experiment = as.character(data50$experiment)
data50$growth = as.numeric(as.character(data50$growth))
data50$dose = as.numeric(as.character(data50$dose))
data50$log10_dose = log10(data50$dose)
data50 = data50[(data50$dose!=0),]

data50$is_ctl = ifelse( (data50$sirna_treatment %in% c("C81 (for ABC6)","C81 (for ABC10)")), 1, 0 )
data50$is_case = ifelse( (data50$is_ctl==0), 1, 0 )

### Calculate TC50

data51 = data50[(data50$sirna_treatment == "C81 (for ABC6)"),]
fit.1component = optimx(start.1component, function(par) loglik.1component(par, x=data51$log10_dose, y=data51$growth), lower=lower.1component, upper=upper.1component, method=c("L-BFGS-B"), control=list(fnscale = -1))
C81_for_ABC6_TC50 = exp(fit.1component$xmid); C81_for_ABC6_TC50 # 8.642368

data51 = data50[(data50$sirna_treatment == "si-ABC6-02"),]
fit.1component = optimx(start.1component, function(par) loglik.1component(par, x=data51$log10_dose, y=data51$growth), lower=lower.1component, upper=upper.1component, method=c("L-BFGS-B"), control=list(fnscale = -1))
siABC602_TC50 = exp(fit.1component$xmid); siABC602_TC50 # 4.704018

data51 = data50[(data50$sirna_treatment == "si-ABC6-01"),]
fit.1component = optimx(start.1component, function(par) loglik.1component(par, x=data51$log10_dose, y=data51$growth), lower=lower.1component, upper=upper.1component, method=c("L-BFGS-B"), control=list(fnscale = -1))
siABC601_TC50 = exp(fit.1component$xmid); siABC601_TC50 # 1.995068

data51 = data50[(data50$sirna_treatment == "C81 (for ABC10)"),]
fit.1component = optimx(start.1component, function(par) loglik.1component(par, x=data51$log10_dose, y=data51$growth), lower=lower.1component, upper=upper.1component, method=c("L-BFGS-B"), control=list(fnscale = -1))
C81_for_ABC10_TC50 = exp(fit.1component$xmid); C81_for_ABC10_TC50 # 54.59813

data51 = data50[(data50$sirna_treatment == "si-ABC10-02"),]
fit.1component = optimx(start.1component, function(par) loglik.1component(par, x=data51$log10_dose, y=data51$growth), lower=lower.1component, upper=upper.1component, method=c("L-BFGS-B"), control=list(fnscale = -1))
siABC1002_TC50 = exp(fit.1component$xmid); siABC1002_TC50 # 3.898307

data51 = data50[(data50$sirna_treatment == "si-ABC10-01"),]
fit.1component = optimx(start.1component, function(par) loglik.1component(par, x=data51$log10_dose, y=data51$growth), lower=lower.1component, upper=upper.1component, method=c("L-BFGS-B"), control=list(fnscale = -1))
siABC1001_TC50 = exp(fit.1component$xmid); siABC1001_TC50 # 54.59092

### Calculate statistical significance

assign_start_lower_upper_values_sirna = function()
{
	A_start = 100;          A_low = 30;              A_high = 120;
	B_start = 5;            B_low = -10;             B_high = 40;
	scal_start = 0.1;       scal_low = -Inf;         scal_high = Inf;
	xmid_start = 0.3;        xmid_low = -2;           xmid_high = 4;
	xshift_start = 0.1;     xshift_low = -1;         xshift_high = 2;
	sigma_start = 0.1;      sigma_low = 1e-4;        sigma_high = Inf;

	start.1component   = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   sigma=sigma_start)
	lower.1component   = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     sigma=sigma_low)
	upper.1component   = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    sigma=sigma_high)
	assign("start.1component", start.1component, envir = .GlobalEnv)
	assign("lower.1component", lower.1component, envir = .GlobalEnv)
	assign("upper.1component", upper.1component, envir = .GlobalEnv)
	assign("start2.1component", start2.1component, envir = .GlobalEnv)

	start.2component = c(A=A_start,   B=B_start,   scal=scal_start,   xmid=xmid_start,   xshift=xshift_start,   sigma=sigma_start)
	lower.2component = c(A=A_low,     B=B_low,     scal=scal_low,     xmid=xmid_low,     xshift=xshift_low,     sigma=sigma_low)
	upper.2component = c(A=A_high,    B=B_high,    scal=scal_high,    xmid=xmid_high,    xshift=xshift_high,    sigma=sigma_high)
	assign("start.2component", start.2component, envir = .GlobalEnv)
	assign("lower.2component", lower.2component, envir = .GlobalEnv)
	assign("upper.2component", upper.2component, envir = .GlobalEnv)
}
assign_start_lower_upper_values_sirna()

data2 = data50[(data50$sirna_treatment %in% c("C81 (for ABC6)","si-ABC6-01")),]
ym155_abc601_fit.1component = optimx(start.1component, function(par) loglik.1component(par, x=data2$log10_dose, y=data2$growth), lower=lower.1component, upper=upper.1component, method=c("L-BFGS-B"), control=list(fnscale = -1))
ym155_abc601_fit.2component = optimx(start.2component, function(par) loglik.2component(par, x=data2$log10_dose, y=data2$growth, is_ctl=data2$is_ctl, is_case=data2$is_case), lower=lower.2component, upper=upper.2component, method=c("L-BFGS-B"), control=list(fnscale = -1))

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
ym155_abc601_fit.1component_vs_2component.pvalue = pchisq(2*(ym155_abc601_fit.2component$value - ym155_abc601_fit.1component$value), degrees_of_freedom, lower.tail = FALSE)
ym155_abc601_fit.1component
ym155_abc601_fit.2component
ym155_abc601_fit.1component_vs_2component.pvalue
convert_values_back_to_interpretable.1component(ym155_abc601_fit.1component)
convert_values_back_to_interpretable.2component(ym155_abc601_fit.2component)

> ym155_abc601_fit.1component
                A        B      scal     xmid    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 94.68505 3.804027 0.2809934 1.406231 6.220483 -116.8867     52     52    NA        0 TRUE FALSE     0
> ym155_abc601_fit.2component
                A        B      scal     xmid    xshift    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 94.19669 4.077803 0.2541715 1.362775 0.1132756 6.018128 -115.6905     65     65    NA        0 TRUE FALSE  0.01
> ym155_abc601_fit.1component_vs_2component.pvalue
[1] 0.1219273
> convert_values_back_to_interpretable.1component(ym155_abc601_fit.1component)
    TC50 
25.48186 
> convert_values_back_to_interpretable.2component(ym155_abc601_fit.2component)
 ctl_TC50 case_TC50 
 23.05555  29.92617 

# Thus, there is not a statistically significant difference between YM155-treated MSTO cells when pretreated with si-ABC6-02 versus C81.
# p-value = 0.1219273. C81 and si-ABC6-01 IC50 = 25.48186

A = ym155_abc601_fit.2component$A
B = ym155_abc601_fit.2component$B
scal = ym155_abc601_fit.2component$scal
xmid = ym155_abc601_fit.2component$xmid
xshift = ym155_abc601_fit.2component$xshift
data3 = data2[(data2$experiment=="1"), c("cellline", "dose", "drug_treatment", "sirna_treatment", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind(data3, data3)
data3 = data3x3

plot_name = 'fig3c_ym155_siabc601_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=sirna_treatment)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$sirna_treatment)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = ym155_abc601_fit.1component$A
B = ym155_abc601_fit.1component$B
scal = ym155_abc601_fit.1component$scal
xmid = ym155_abc601_fit.1component$xmid
data3 = data2[(data2$experiment=="1"), c("cellline", "dose", "drug_treatment", "sirna_treatment", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind(data3, data3)
data3 = data3x3

plot_name = 'fig3c_ym155_siabc601_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=sirna_treatment)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

###
data2 = data50[(data50$sirna_treatment %in% c("C81 (for ABC6)","si-ABC6-02")),]
ym155_abc602_fit.1component = optimx(start.1component, function(par) loglik.1component(par, x=data2$log10_dose, y=data2$growth), lower=lower.1component, upper=upper.1component, method=c("L-BFGS-B"), control=list(fnscale = -1))
ym155_abc602_fit.2component = optimx(start.2component, function(par) loglik.2component(par, x=data2$log10_dose, y=data2$growth, is_ctl=data2$is_ctl, is_case=data2$is_case), lower=lower.2component, upper=upper.2component, method=c("L-BFGS-B"), control=list(fnscale = -1))

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
ym155_abc602_fit.1component_vs_2component.pvalue = pchisq(2*(ym155_abc602_fit.2component$value - ym155_abc602_fit.1component$value), degrees_of_freedom, lower.tail = FALSE)
ym155_abc602_fit.1component
ym155_abc602_fit.2component
ym155_abc602_fit.1component_vs_2component.pvalue
convert_values_back_to_interpretable.1component(ym155_abc602_fit.1component)
convert_values_back_to_interpretable.2component(ym155_abc602_fit.2component)

> ym155_abc602_fit.1component
                A        B    scal     xmid    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 87.43031 2.695105 0.35298 1.085483 15.88353 -150.6319     72     72    NA        0 TRUE FALSE  0.02
> ym155_abc602_fit.2component
                A        B      scal     xmid     xshift    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 89.46155 5.116479 0.2178822 1.383684 -0.9210427 9.866224 -133.5078     95     95    NA        0 TRUE FALSE  0.02
> ym155_abc602_fit.1component_vs_2component.pvalue
[1] 4.85089e-09
> convert_values_back_to_interpretable.1component(ym155_abc602_fit.1component)
    TC50 
12.17539 
> convert_values_back_to_interpretable.2component(ym155_abc602_fit.2component)
 ctl_TC50 case_TC50 
24.192687  2.901626

# Thus, there is not a statistically significant difference between YM155-treated MSTO cells when pretreated with si-ABC6-01 versus C81.
# p-value = 4.85089e-09. C81 IC50 = 24.192687. si-ABC6-02 IC50 = 2.901626

A = ym155_abc602_fit.2component$A
B = ym155_abc602_fit.2component$B
scal = ym155_abc602_fit.2component$scal
xmid = ym155_abc602_fit.2component$xmid
xshift = ym155_abc602_fit.2component$xshift
data3 = data2[(data2$experiment=="1"), c("cellline", "dose", "drug_treatment", "sirna_treatment", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind(data3, data3)
data3 = data3x3

plot_name = 'fig3c_ym155_siabc602_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=sirna_treatment)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$sirna_treatment)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = ym155_abc602_fit.1component$A
B = ym155_abc602_fit.1component$B
scal = ym155_abc602_fit.1component$scal
xmid = ym155_abc602_fit.1component$xmid
data3 = data2[(data2$experiment=="1"), c("cellline", "dose", "drug_treatment", "sirna_treatment", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind(data3, data3)
data3 = data3x3

plot_name = 'fig3c_ym155_siabc602_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=sirna_treatment)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

###
data2 = data50[(data50$sirna_treatment %in% c("C81 (for ABC6)","si-ABC10-01")),]
ym155_abc1001_fit.1component = optimx(start.1component, function(par) loglik.1component(par, x=data2$log10_dose, y=data2$growth), lower=lower.1component, upper=upper.1component, method=c("L-BFGS-B"), control=list(fnscale = -1))
ym155_abc1001_fit.2component = optimx(start.2component, function(par) loglik.2component(par, x=data2$log10_dose, y=data2$growth, is_ctl=data2$is_ctl, is_case=data2$is_case), lower=lower.2component, upper=upper.2component, method=c("L-BFGS-B"), control=list(fnscale = -1))

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
ym155_abc1001_fit.1component_vs_2component.pvalue = pchisq(2*(ym155_abc1001_fit.2component$value - ym155_abc1001_fit.1component$value), degrees_of_freedom, lower.tail = FALSE)
ym155_abc1001_fit.1component
ym155_abc1001_fit.2component
ym155_abc1001_fit.1component_vs_2component.pvalue
convert_values_back_to_interpretable.1component(ym155_abc1001_fit.1component)
convert_values_back_to_interpretable.2component(ym155_abc1001_fit.2component)

> ym155_abc1001_fit.1component
                A        B     scal     xmid    sigma    value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 95.03857 4.034387 0.174249 1.347179 4.598205 -106.006     73     73    NA        0 TRUE FALSE  0.01
> ym155_abc1001_fit.2component
                A        B      scal     xmid      xshift    sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 95.17469 4.014507 0.1805985 1.371635 -0.06393897 4.461493 -104.9189     73     73    NA        0 TRUE FALSE  0.02
> ym155_abc1001_fit.1component_vs_2component.pvalue
[1] 0.1403348
> convert_values_back_to_interpretable.1component(ym155_abc1001_fit.1component)
    TC50 
22.24227 
> convert_values_back_to_interpretable.2component(ym155_abc1001_fit.2component)
 ctl_TC50 case_TC50 
 23.53069  20.30934

# Thus, there is not a statistically significant difference between YM155-treated MSTO cells when pretreated with si-ABC10-02 versus C81.
# p-value = 0.1403348. C81 and si-ABC10-01 IC50 = 22.24227

A = ym155_abc1001_fit.2component$A
B = ym155_abc1001_fit.2component$B
scal = ym155_abc1001_fit.2component$scal
xmid = ym155_abc1001_fit.2component$xmid
xshift = ym155_abc1001_fit.2component$xshift
data3 = data2[(data2$experiment=="1"), c("cellline", "dose", "drug_treatment", "sirna_treatment", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind(data3, data3)
data3 = data3x3

plot_name = 'fig3c_ym155_siabc1001_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=sirna_treatment)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$sirna_treatment)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = ym155_abc1001_fit.1component$A
B = ym155_abc1001_fit.1component$B
scal = ym155_abc1001_fit.1component$scal
xmid = ym155_abc1001_fit.1component$xmid
data3 = data2[(data2$experiment=="1"), c("cellline", "dose", "drug_treatment", "sirna_treatment", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind(data3, data3)
data3 = data3x3

plot_name = 'fig3c_ym155_siabc1001_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=sirna_treatment)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

###
#assign_start_lower_upper_values_2()
data2 = data50[(data50$sirna_treatment %in% c("C81 (for ABC6)","si-ABC10-02")),]
ym155_abc1002_fit.1component = optimx(start.1component, function(par) loglik.1component(par, x=data2$log10_dose, y=data2$growth), lower=lower.1component, upper=upper.1component, method=c("L-BFGS-B"), control=list(fnscale = -1))
ym155_abc1002_fit.2component = optimx(start.2component, function(par) loglik.2component(par, x=data2$log10_dose, y=data2$growth, is_ctl=data2$is_ctl, is_case=data2$is_case), lower=lower.2component, upper=upper.2component, method=c("L-BFGS-B"), control=list(fnscale = -1))

degrees_of_freedom=1 # 2component has 1 additional variable (xshift) that 1component doesn't have
ym155_abc1002_fit.1component_vs_2component.pvalue = pchisq(2*(ym155_abc1002_fit.2component$value - ym155_abc1002_fit.1component$value), degrees_of_freedom, lower.tail = FALSE)
ym155_abc1002_fit.1component
ym155_abc1002_fit.2component
ym155_abc1002_fit.1component_vs_2component.pvalue
convert_values_back_to_interpretable.1component(ym155_abc1002_fit.1component)
convert_values_back_to_interpretable.2component(ym155_abc1002_fit.2component)

> ym155_abc1002_fit.1component
                A        B      scal     xmid   sigma     value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 97.13431 3.384764 0.2460086 1.153247 7.35849 -122.9308     68     68    NA        0 TRUE FALSE     0
> ym155_abc1002_fit.2component
                A        B      scal     xmid     xshift    sigma    value fevals gevals niter convcode kkt1  kkt2 xtime
L-BFGS-B 97.32621 3.928729 0.1919935 1.357224 -0.4527442 3.107938 -91.9034     75     75    NA        0 TRUE FALSE  0.01
> ym155_abc1002_fit.1component_vs_2component.pvalue
[1] 3.340353e-15
> convert_values_back_to_interpretable.1component(ym155_abc1002_fit.1component)
    TC50 
14.23137 
> convert_values_back_to_interpretable.2component(ym155_abc1002_fit.2component)
 ctl_TC50 case_TC50 
22.762727  8.025648

# Thus, there is a statistically significant difference between YM155-treated MSTO cells when pretreated with si-ABC10-01 versus C81.
# p-value = 3.340353e-15. C81 IC50 = 22.762727. si-ABC10-02 IC50 = 8.025648

A = ym155_abc1002_fit.2component$A
B = ym155_abc1002_fit.2component$B
scal = ym155_abc1002_fit.2component$scal
xmid = ym155_abc1002_fit.2component$xmid
xshift = ym155_abc1002_fit.2component$xshift
data3 = data2[(data2$experiment=="1"), c("cellline", "dose", "drug_treatment", "sirna_treatment", "log10_dose", "is_ctl", "is_case")]
data3$final_xshift = data3$is_case * xshift
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid + data3$final_xshift - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind(data3, data3)
data3 = data3x3

plot_name = 'fig3c_ym155_siabc1002_with_2component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=sirna_treatment)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col=data3$sirna_treatment)) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )

A = ym155_abc1002_fit.1component$A
B = ym155_abc1002_fit.1component$B
scal = ym155_abc1002_fit.1component$scal
xmid = ym155_abc1002_fit.1component$xmid
data3 = data2[(data2$experiment=="1"), c("cellline", "dose", "drug_treatment", "sirna_treatment", "log10_dose", "is_ctl", "is_case")]
data3$fitted_line = A + (B - A) * (1 / (1 + exp((xmid - data3$log10_dose) / scal)))
data3$actual_fitted_line = 10^data3$fitted_line
data3x3 = rbind(data3, data3)
data3 = data3x3

plot_name = 'fig3c_ym155_siabc1002_with_1component_model_fitted_line_log.png'
ggplot(data2, aes(x=log10_dose, y=growth, col=sirna_treatment)) + geom_point() + geom_line(aes(x=data3$log10_dose, y=data3$fitted_line, col="fitted line for both")) + ggtitle(plot_name)
ggsave( plot_name, plot=last_plot() )


########## DATA


##########
data_mstoh211_mirna_cisplatin_gemcitabine_ym155.txt

cellline	dose	drug	mirna	experiment	growth
MSTO-211H	0	YM155	C81	1	106.5832
MSTO-211H	19.531	YM155	C81	1	75.30965
MSTO-211H	39.063	YM155	C81	1	68.41143
MSTO-211H	78.125	YM155	C81	1	55.55947
MSTO-211H	156.25	YM155	C81	1	38.05541
MSTO-211H	312.5	YM155	C81	1	17.09818
MSTO-211H	625	YM155	C81	1	4.889455
MSTO-211H	1250	YM155	C81	1	4.249691
MSTO-211H	2500	YM155	C81	1	4.16665
MSTO-211H	5000	YM155	C81	1	4.120452
MSTO-211H	0	YM155	C81	2	94.84349
MSTO-211H	19.531	YM155	C81	2	70.87926
MSTO-211H	39.063	YM155	C81	2	67.99213
MSTO-211H	78.125	YM155	C81	2	48.58811
MSTO-211H	156.25	YM155	C81	2	41.03723
MSTO-211H	312.5	YM155	C81	2	19.197
MSTO-211H	625	YM155	C81	2	4.67542
MSTO-211H	1250	YM155	C81	2	4.161972
MSTO-211H	2500	YM155	C81	2	4.174253
MSTO-211H	5000	YM155	C81	2	4.1532
MSTO-211H	0	YM155	C81	3	98.5733
MSTO-211H	19.531	YM155	C81	3	67.17108
MSTO-211H	39.063	YM155	C81	3	63.27402
MSTO-211H	78.125	YM155	C81	3	48.65595
MSTO-211H	156.25	YM155	C81	3	39.54484
MSTO-211H	312.5	YM155	C81	3	17.90578
MSTO-211H	625	YM155	C81	3	4.937408
MSTO-211H	1250	YM155	C81	3	4.234486
MSTO-211H	2500	YM155	C81	3	4.176592
MSTO-211H	5000	YM155	C81	3	4.129808
MSTO-211H	0	YM155	miR-137-3p	1	76.87865
MSTO-211H	19.531	YM155	miR-137-3p	1	60.66351
MSTO-211H	39.063	YM155	miR-137-3p	1	65.50559
MSTO-211H	78.125	YM155	miR-137-3p	1	50.56121
MSTO-211H	156.25	YM155	miR-137-3p	1	42.74603
MSTO-211H	312.5	YM155	miR-137-3p	1	22.71161
MSTO-211H	625	YM155	miR-137-3p	1	5.517522
MSTO-211H	1250	YM155	miR-137-3p	1	4.552614
MSTO-211H	2500	YM155	miR-137-3p	1	4.383609
MSTO-211H	5000	YM155	miR-137-3p	1	4.281855
MSTO-211H	0	YM155	miR-137-3p	2	74.33421
MSTO-211H	19.531	YM155	miR-137-3p	2	60.34947
MSTO-211H	39.063	YM155	miR-137-3p	2	60.52666
MSTO-211H	78.125	YM155	miR-137-3p	2	48.14601
MSTO-211H	156.25	YM155	miR-137-3p	2	41.11095
MSTO-211H	312.5	YM155	miR-137-3p	2	21.73383
MSTO-211H	625	YM155	miR-137-3p	2	7.039154
MSTO-211H	1250	YM155	miR-137-3p	2	4.45086
MSTO-211H	2500	YM155	miR-137-3p	2	4.302322
MSTO-211H	5000	YM155	miR-137-3p	2	4.150276
MSTO-211H	0	YM155	miR-137-3p	3	66.3512
MSTO-211H	19.531	YM155	miR-137-3p	3	57.94188
MSTO-211H	39.063	YM155	miR-137-3p	3	57.76059
MSTO-211H	78.125	YM155	miR-137-3p	3	46.72438
MSTO-211H	156.25	YM155	miR-137-3p	3	37.85482
MSTO-211H	312.5	YM155	miR-137-3p	3	20.02448
MSTO-211H	625	YM155	miR-137-3p	3	5.879509
MSTO-211H	1250	YM155	miR-137-3p	3	4.505246
MSTO-211H	2500	YM155	miR-137-3p	3	4.388872
MSTO-211H	5000	YM155	miR-137-3p	3	4.18127
MSTO-211H	0	YM155	miR-142-5p	1	87.58328
MSTO-211H	19.531	YM155	miR-142-5p	1	62.5635
MSTO-211H	39.063	YM155	miR-142-5p	1	57.25826
MSTO-211H	78.125	YM155	miR-142-5p	1	44.11035
MSTO-211H	156.25	YM155	miR-142-5p	1	40.7361
MSTO-211H	312.5	YM155	miR-142-5p	1	19.4584
MSTO-211H	625	YM155	miR-142-5p	1	7.377164
MSTO-211H	1250	YM155	miR-142-5p	1	3.8994
MSTO-211H	2500	YM155	miR-142-5p	1	3.846184
MSTO-211H	5000	YM155	miR-142-5p	1	3.835073
MSTO-211H	0	YM155	miR-142-5p	2	113.7715
MSTO-211H	19.531	YM155	miR-142-5p	2	59.5717
MSTO-211H	39.063	YM155	miR-142-5p	2	56.122
MSTO-211H	78.125	YM155	miR-142-5p	2	43.08872
MSTO-211H	156.25	YM155	miR-142-5p	2	37.41097
MSTO-211H	312.5	YM155	miR-142-5p	2	20.48121
MSTO-211H	625	YM155	miR-142-5p	2	5.740913
MSTO-211H	1250	YM155	miR-142-5p	2	3.853786
MSTO-211H	2500	YM155	miR-142-5p	2	3.835073
MSTO-211H	5000	YM155	miR-142-5p	2	3.796476
MSTO-211H	0	YM155	miR-142-5p	3	86.55873
MSTO-211H	19.531	YM155	miR-142-5p	3	61.94479
MSTO-211H	39.063	YM155	miR-142-5p	3	55.1647
MSTO-211H	78.125	YM155	miR-142-5p	3	43.9624
MSTO-211H	156.25	YM155	miR-142-5p	3	36.90103
MSTO-211H	312.5	YM155	miR-142-5p	3	17.51455
MSTO-211H	625	YM155	miR-142-5p	3	5.63682
MSTO-211H	1250	YM155	miR-142-5p	3	3.834488
MSTO-211H	2500	YM155	miR-142-5p	3	3.799985
MSTO-211H	5000	YM155	miR-142-5p	3	3.78712
MSTO-211H	0	YM155	miR-193a-3p	1	66.00442
MSTO-211H	19.531	YM155	miR-193a-3p	1	43.46299
MSTO-211H	39.063	YM155	miR-193a-3p	1	42.81504
MSTO-211H	78.125	YM155	miR-193a-3p	1	29.09111
MSTO-211H	156.25	YM155	miR-193a-3p	1	17.5718
MSTO-211H	312.5	YM155	miR-193a-3p	1	14.46603
MSTO-211H	625	YM155	miR-193a-3p	1	4.856706
MSTO-211H	1250	YM155	miR-193a-3p	1	3.826886
MSTO-211H	2500	YM155	miR-193a-3p	1	3.826301
MSTO-211H	5000	YM155	miR-193a-3p	1	3.807587
MSTO-211H	0	YM155	miR-193a-3p	2	65.20852
MSTO-211H	19.531	YM155	miR-193a-3p	2	42.31621
MSTO-211H	39.063	YM155	miR-193a-3p	2	37.26126
MSTO-211H	78.125	YM155	miR-193a-3p	2	27.7496
MSTO-211H	156.25	YM155	miR-193a-3p	2	18.94784
MSTO-211H	312.5	YM155	miR-193a-3p	2	15.2631
MSTO-211H	625	YM155	miR-193a-3p	2	5.374248
MSTO-211H	1250	YM155	miR-193a-3p	2	3.811681
MSTO-211H	2500	YM155	miR-193a-3p	2	3.81402
MSTO-211H	5000	YM155	miR-193a-3p	2	3.795307
MSTO-211H	0	YM155	miR-193a-3p	3	57.11908
MSTO-211H	19.531	YM155	miR-193a-3p	3	41.31914
MSTO-211H	39.063	YM155	miR-193a-3p	3	38.02324
MSTO-211H	78.125	YM155	miR-193a-3p	3	28.71743
MSTO-211H	156.25	YM155	miR-193a-3p	3	19.66246
MSTO-211H	312.5	YM155	miR-193a-3p	3	13.97304
MSTO-211H	625	YM155	miR-193a-3p	3	5.183021
MSTO-211H	1250	YM155	miR-193a-3p	3	3.854371
MSTO-211H	2500	YM155	miR-193a-3p	3	3.81519
MSTO-211H	5000	YM155	miR-193a-3p	3	3.828055
MSTO-211H	0	YM155	miR-192-5p	1	94.17916
MSTO-211H	19.531	YM155	miR-192-5p	1	57.65416
MSTO-211H	39.063	YM155	miR-192-5p	1	52.47056
MSTO-211H	78.125	YM155	miR-192-5p	1	33.42677
MSTO-211H	156.25	YM155	miR-192-5p	1	29.09049
MSTO-211H	312.5	YM155	miR-192-5p	1	12.47831
MSTO-211H	625	YM155	miR-192-5p	1	4.538579
MSTO-211H	1250	YM155	miR-192-5p	1	3.625132
MSTO-211H	2500	YM155	miR-192-5p	1	3.570162
MSTO-211H	5000	YM155	miR-192-5p	1	3.581857
MSTO-211H	0	YM155	miR-192-5p	2	90.27216
MSTO-211H	19.531	YM155	miR-192-5p	2	58.36059
MSTO-211H	39.063	YM155	miR-192-5p	2	48.72788
MSTO-211H	78.125	YM155	miR-192-5p	2	31.30105
MSTO-211H	156.25	YM155	miR-192-5p	2	27.01214
MSTO-211H	312.5	YM155	miR-192-5p	2	12.58065
MSTO-211H	625	YM155	miR-192-5p	2	4.29472
MSTO-211H	1250	YM155	miR-192-5p	2	3.669576
MSTO-211H	2500	YM155	miR-192-5p	2	3.598232
MSTO-211H	5000	YM155	miR-192-5p	2	3.530396
MSTO-211H	0	YM155	miR-192-5p	3	91.86806
MSTO-211H	19.531	YM155	miR-192-5p	3	60.67871
MSTO-211H	39.063	YM155	miR-192-5p	3	50.45653
MSTO-211H	78.125	YM155	miR-192-5p	3	32.07531
MSTO-211H	156.25	YM155	miR-192-5p	3	27.88933
MSTO-211H	312.5	YM155	miR-192-5p	3	14.121
MSTO-211H	625	YM155	miR-192-5p	3	5.984772
MSTO-211H	1250	YM155	miR-192-5p	3	3.728056
MSTO-211H	2500	YM155	miR-192-5p	3	3.603495
MSTO-211H	5000	YM155	miR-192-5p	3	3.563144
MSTO-211H	0	YM155	miR-122-5p	1	98.24114
MSTO-211H	19.531	YM155	miR-122-5p	1	67.81786
MSTO-211H	39.063	YM155	miR-122-5p	1	61.73836
MSTO-211H	78.125	YM155	miR-122-5p	1	44.82965
MSTO-211H	156.25	YM155	miR-122-5p	1	36.9273
MSTO-211H	312.5	YM155	miR-122-5p	1	18.89466
MSTO-211H	625	YM155	miR-122-5p	1	3.952616
MSTO-211H	1250	YM155	miR-122-5p	1	3.544431
MSTO-211H	2500	YM155	miR-122-5p	1	3.547939
MSTO-211H	5000	YM155	miR-122-5p	1	3.513437
MSTO-211H	0	YM155	miR-122-5p	2	99.15341
MSTO-211H	19.531	YM155	miR-122-5p	2	63.27461
MSTO-211H	39.063	YM155	miR-122-5p	2	62.69917
MSTO-211H	78.125	YM155	miR-122-5p	2	46.0314
MSTO-211H	156.25	YM155	miR-122-5p	2	32.37761
MSTO-211H	312.5	YM155	miR-122-5p	2	16.66017
MSTO-211H	625	YM155	miR-122-5p	2	3.840336
MSTO-211H	1250	YM155	miR-122-5p	2	3.549694
MSTO-211H	2500	YM155	miR-122-5p	2	3.50291
MSTO-211H	5000	YM155	miR-122-5p	2	3.492384
MSTO-211H	0	YM155	miR-122-5p	3	97.09026
MSTO-211H	19.531	YM155	miR-122-5p	3	62.19917
MSTO-211H	39.063	YM155	miR-122-5p	3	56.66586
MSTO-211H	78.125	YM155	miR-122-5p	3	46.50684
MSTO-211H	156.25	YM155	miR-122-5p	3	30.20978
MSTO-211H	312.5	YM155	miR-122-5p	3	19.29525
MSTO-211H	625	YM155	miR-122-5p	3	4.076008
MSTO-211H	1250	YM155	miR-122-5p	3	3.581273
MSTO-211H	2500	YM155	miR-122-5p	3	3.530396
MSTO-211H	5000	YM155	miR-122-5p	3	3.523963
MSTO-211H	0	YM155	miR-222-3p	1	99.7347
MSTO-211H	19.531	YM155	miR-222-3p	1	68.02079
MSTO-211H	39.063	YM155	miR-222-3p	1	58.94188
MSTO-211H	78.125	YM155	miR-222-3p	1	38.29283
MSTO-211H	156.25	YM155	miR-222-3p	1	29.73084
MSTO-211H	312.5	YM155	miR-222-3p	1	19.89174
MSTO-211H	625	YM155	miR-222-3p	1	4.638578
MSTO-211H	1250	YM155	miR-222-3p	1	3.740921
MSTO-211H	2500	YM155	miR-222-3p	1	3.612267
MSTO-211H	5000	YM155	miR-222-3p	1	3.515776
MSTO-211H	0	YM155	miR-222-3p	2	99.58967
MSTO-211H	19.531	YM155	miR-222-3p	2	62.20093
MSTO-211H	39.063	YM155	miR-222-3p	2	58.12141
MSTO-211H	78.125	YM155	miR-222-3p	2	38.1443
MSTO-211H	156.25	YM155	miR-222-3p	2	29.13552
MSTO-211H	312.5	YM155	miR-222-3p	2	15.61339
MSTO-211H	625	YM155	miR-222-3p	2	4.43741
MSTO-211H	1250	YM155	miR-222-3p	2	3.665483
MSTO-211H	2500	YM155	miR-222-3p	2	3.5456
MSTO-211H	5000	YM155	miR-222-3p	2	3.471331
MSTO-211H	0	YM155	miR-222-3p	3	94.50723
MSTO-211H	19.531	YM155	miR-222-3p	3	64.19975
MSTO-211H	39.063	YM155	miR-222-3p	3	55.06236
MSTO-211H	78.125	YM155	miR-222-3p	3	40.38522
MSTO-211H	156.25	YM155	miR-222-3p	3	21.37469
MSTO-211H	312.5	YM155	miR-222-3p	3	19.41513
MSTO-211H	625	YM155	miR-222-3p	3	5.924538
MSTO-211H	1250	YM155	miR-222-3p	3	3.690044
MSTO-211H	2500	YM155	miR-222-3p	3	3.561974
MSTO-211H	5000	YM155	miR-222-3p	3	3.525717
MSTO-211H	0	YM155	miR-214-3p	1	82.01664
MSTO-211H	19.531	YM155	miR-214-3p	1	52.21032
MSTO-211H	39.063	YM155	miR-214-3p	1	50.99746
MSTO-211H	78.125	YM155	miR-214-3p	1	37.89576
MSTO-211H	156.25	YM155	miR-214-3p	1	27.26067
MSTO-211H	312.5	YM155	miR-214-3p	1	18.13268
MSTO-211H	625	YM155	miR-214-3p	1	6.816932
MSTO-211H	1250	YM155	miR-214-3p	1	3.621039
MSTO-211H	2500	YM155	miR-214-3p	1	3.597647
MSTO-211H	5000	YM155	miR-214-3p	1	3.597647
MSTO-211H	0	YM155	miR-214-3p	2	81.24998
MSTO-211H	19.531	YM155	miR-214-3p	2	51.37407
MSTO-211H	39.063	YM155	miR-214-3p	2	49.02203
MSTO-211H	78.125	YM155	miR-214-3p	2	37.64371
MSTO-211H	156.25	YM155	miR-214-3p	2	27.36418
MSTO-211H	312.5	YM155	miR-214-3p	2	17.86426
MSTO-211H	625	YM155	miR-214-3p	2	6.759623
MSTO-211H	1250	YM155	miR-214-3p	2	3.605249
MSTO-211H	2500	YM155	miR-214-3p	2	3.581857
MSTO-211H	5000	YM155	miR-214-3p	2	3.592968
MSTO-211H	0	YM155	miR-214-3p	3	79.76285
MSTO-211H	19.531	YM155	miR-214-3p	3	50.8536
MSTO-211H	39.063	YM155	miR-214-3p	3	46.31502
MSTO-211H	78.125	YM155	miR-214-3p	3	37.28816
MSTO-211H	156.25	YM155	miR-214-3p	3	27.33202
MSTO-211H	312.5	YM155	miR-214-3p	3	16.21573
MSTO-211H	625	YM155	miR-214-3p	3	6.653775
MSTO-211H	1250	YM155	miR-214-3p	3	3.635658
MSTO-211H	2500	YM155	miR-214-3p	3	3.64443
MSTO-211H	5000	YM155	miR-214-3p	3	3.628641
MSTO-211H	0	YM155	miR-148a-3p	1	115.306
MSTO-211H	19.531	YM155	miR-148a-3p	1	39.52031
MSTO-211H	39.063	YM155	miR-148a-3p	1	25.90926
MSTO-211H	78.125	YM155	miR-148a-3p	1	19.73443
MSTO-211H	156.25	YM155	miR-148a-3p	1	12.46424
MSTO-211H	312.5	YM155	miR-148a-3p	1	10.88709
MSTO-211H	625	YM155	miR-148a-3p	1	3.739752
MSTO-211H	1250	YM155	miR-148a-3p	1	3.585951
MSTO-211H	2500	YM155	miR-148a-3p	1	3.580688
MSTO-211H	5000	YM155	miR-148a-3p	1	3.567238
MSTO-211H	0	YM155	miR-148a-3p	2	110.4616
MSTO-211H	19.531	YM155	miR-148a-3p	2	34.14665
MSTO-211H	39.063	YM155	miR-148a-3p	2	25.30341
MSTO-211H	78.125	YM155	miR-148a-3p	2	18.83092
MSTO-211H	156.25	YM155	miR-148a-3p	2	15.78236
MSTO-211H	312.5	YM155	miR-148a-3p	2	10.59879
MSTO-211H	625	YM155	miR-148a-3p	2	4.316942
MSTO-211H	1250	YM155	miR-148a-3p	2	3.579518
MSTO-211H	2500	YM155	miR-148a-3p	2	3.567822
MSTO-211H	5000	YM155	miR-148a-3p	2	3.583027
MSTO-211H	0	YM155	miR-148a-3p	3	117.758
MSTO-211H	19.531	YM155	miR-148a-3p	3	34.97296
MSTO-211H	39.063	YM155	miR-148a-3p	3	22.92623
MSTO-211H	78.125	YM155	miR-148a-3p	3	19.48063
MSTO-211H	156.25	YM155	miR-148a-3p	3	18.91568
MSTO-211H	312.5	YM155	miR-148a-3p	3	11.97481
MSTO-211H	625	YM155	miR-148a-3p	3	4.03975
MSTO-211H	1250	YM155	miR-148a-3p	3	3.554957
MSTO-211H	2500	YM155	miR-148a-3p	3	3.585366
MSTO-211H	5000	YM155	miR-148a-3p	3	3.558466
MSTO-211H	0	Cisplatin	C81	1	104.5954
MSTO-211H	1.5625	Cisplatin	C81	1	95.45878
MSTO-211H	3.125	Cisplatin	C81	1	75.62224
MSTO-211H	6.25	Cisplatin	C81	1	53.74734
MSTO-211H	12.5	Cisplatin	C81	1	35.9589
MSTO-211H	25	Cisplatin	C81	1	28.64851
MSTO-211H	50	Cisplatin	C81	1	21.96418
MSTO-211H	100	Cisplatin	C81	1	19.07249
MSTO-211H	200	Cisplatin	C81	1	13.72633
MSTO-211H	400	Cisplatin	C81	1	6.803913
MSTO-211H	0	Cisplatin	C81	2	105.762
MSTO-211H	1.5625	Cisplatin	C81	2	90.68889
MSTO-211H	3.125	Cisplatin	C81	2	74.04599
MSTO-211H	6.25	Cisplatin	C81	2	53.45947
MSTO-211H	12.5	Cisplatin	C81	2	39.28564
MSTO-211H	25	Cisplatin	C81	2	30.91684
MSTO-211H	50	Cisplatin	C81	2	22.38733
MSTO-211H	100	Cisplatin	C81	2	18.58495
MSTO-211H	200	Cisplatin	C81	2	13.94548
MSTO-211H	400	Cisplatin	C81	2	6.88075
MSTO-211H	0	Cisplatin	C81	3	101.8146
MSTO-211H	1.5625	Cisplatin	C81	3	84.36819
MSTO-211H	3.125	Cisplatin	C81	3	74.48807
MSTO-211H	6.25	Cisplatin	C81	3	57.17797
MSTO-211H	12.5	Cisplatin	C81	3	42.52797
MSTO-211H	25	Cisplatin	C81	3	31.92276
MSTO-211H	50	Cisplatin	C81	3	24.26606
MSTO-211H	100	Cisplatin	C81	3	19.92636
MSTO-211H	200	Cisplatin	C81	3	14.70303
MSTO-211H	400	Cisplatin	C81	3	6.8077
MSTO-211H	0	Cisplatin	miR-486-5p	1	99.11884
MSTO-211H	1.5625	Cisplatin	miR-486-5p	1	91.21215
MSTO-211H	3.125	Cisplatin	miR-486-5p	1	71.92484
MSTO-211H	6.25	Cisplatin	miR-486-5p	1	48.55647
MSTO-211H	12.5	Cisplatin	miR-486-5p	1	32.66517
MSTO-211H	25	Cisplatin	miR-486-5p	1	27.47376
MSTO-211H	50	Cisplatin	miR-486-5p	1	22.65788
MSTO-211H	100	Cisplatin	miR-486-5p	1	18.79761
MSTO-211H	200	Cisplatin	miR-486-5p	1	14.88214
MSTO-211H	400	Cisplatin	miR-486-5p	1	6.926203
MSTO-211H	0	Cisplatin	miR-486-5p	2	99.2341
MSTO-211H	1.5625	Cisplatin	miR-486-5p	2	87.44548
MSTO-211H	3.125	Cisplatin	miR-486-5p	2	69.83723
MSTO-211H	6.25	Cisplatin	miR-486-5p	2	47.076
MSTO-211H	12.5	Cisplatin	miR-486-5p	2	33.09372
MSTO-211H	25	Cisplatin	miR-486-5p	2	26.54143
MSTO-211H	50	Cisplatin	miR-486-5p	2	22.61135
MSTO-211H	100	Cisplatin	miR-486-5p	2	18.30357
MSTO-211H	200	Cisplatin	miR-486-5p	2	14.52176
MSTO-211H	400	Cisplatin	miR-486-5p	2	6.856941
MSTO-211H	0	Cisplatin	miR-486-5p	3	101.2362
MSTO-211H	1.5625	Cisplatin	miR-486-5p	3	93.08168
MSTO-211H	3.125	Cisplatin	miR-486-5p	3	70.15541
MSTO-211H	6.25	Cisplatin	miR-486-5p	3	46.81572
MSTO-211H	12.5	Cisplatin	miR-486-5p	3	33.275
MSTO-211H	25	Cisplatin	miR-486-5p	3	25.50087
MSTO-211H	50	Cisplatin	miR-486-5p	3	21.78886
MSTO-211H	100	Cisplatin	miR-486-5p	3	18.1683
MSTO-211H	200	Cisplatin	miR-486-5p	3	14.36971
MSTO-211H	400	Cisplatin	miR-486-5p	3	6.786597
MSTO-211H	0	Cisplatin	miR-31-5p	1	102.438
MSTO-211H	1.5625	Cisplatin	miR-31-5p	1	91.18022
MSTO-211H	3.125	Cisplatin	miR-31-5p	1	72.67644
MSTO-211H	6.25	Cisplatin	miR-31-5p	1	52.35506
MSTO-211H	12.5	Cisplatin	miR-31-5p	1	35.85934
MSTO-211H	25	Cisplatin	miR-31-5p	1	28.38932
MSTO-211H	50	Cisplatin	miR-31-5p	1	21.77371
MSTO-211H	100	Cisplatin	miR-31-5p	1	18.51244
MSTO-211H	200	Cisplatin	miR-31-5p	1	13.75176
MSTO-211H	400	Cisplatin	miR-31-5p	1	6.606949
MSTO-211H	0	Cisplatin	miR-31-5p	2	105.2144
MSTO-211H	1.5625	Cisplatin	miR-31-5p	2	90.75653
MSTO-211H	3.125	Cisplatin	miR-31-5p	2	69.2431
MSTO-211H	6.25	Cisplatin	miR-31-5p	2	52.72085
MSTO-211H	12.5	Cisplatin	miR-31-5p	2	33.78148
MSTO-211H	25	Cisplatin	miR-31-5p	2	26.01763
MSTO-211H	50	Cisplatin	miR-31-5p	2	21.30565
MSTO-211H	100	Cisplatin	miR-31-5p	2	17.58823
MSTO-211H	200	Cisplatin	miR-31-5p	2	13.29344
MSTO-211H	400	Cisplatin	miR-31-5p	2	6.480329
MSTO-211H	0	Cisplatin	miR-31-5p	3	106.4882
MSTO-211H	1.5625	Cisplatin	miR-31-5p	3	88.242
MSTO-211H	3.125	Cisplatin	miR-31-5p	3	69.54341
MSTO-211H	6.25	Cisplatin	miR-31-5p	3	50.5997
MSTO-211H	12.5	Cisplatin	miR-31-5p	3	34.2241
MSTO-211H	25	Cisplatin	miR-31-5p	3	27.26056
MSTO-211H	50	Cisplatin	miR-31-5p	3	20.16932
MSTO-211H	100	Cisplatin	miR-31-5p	3	16.83987
MSTO-211H	200	Cisplatin	miR-31-5p	3	13.02234
MSTO-211H	400	Cisplatin	miR-31-5p	3	6.274707
MSTO-211H	0	Cisplatin	miR-31-3p	1	85.07218
MSTO-211H	1.5625	Cisplatin	miR-31-3p	1	75.49616
MSTO-211H	3.125	Cisplatin	miR-31-3p	1	61.95651
MSTO-211H	6.25	Cisplatin	miR-31-3p	1	50.19441
MSTO-211H	12.5	Cisplatin	miR-31-3p	1	35.87341
MSTO-211H	25	Cisplatin	miR-31-3p	1	27.76596
MSTO-211H	50	Cisplatin	miR-31-3p	1	21.65845
MSTO-211H	100	Cisplatin	miR-31-3p	1	16.73219
MSTO-211H	200	Cisplatin	miR-31-3p	1	13.06888
MSTO-211H	400	Cisplatin	miR-31-3p	1	6.333688
MSTO-211H	0	Cisplatin	miR-31-3p	2	89.05366
MSTO-211H	1.5625	Cisplatin	miR-31-3p	2	73.40423
MSTO-211H	3.125	Cisplatin	miR-31-3p	2	61.66323
MSTO-211H	6.25	Cisplatin	miR-31-3p	2	49.53209
MSTO-211H	12.5	Cisplatin	miR-31-3p	2	36.62771
MSTO-211H	25	Cisplatin	miR-31-3p	2	26.90397
MSTO-211H	50	Cisplatin	miR-31-3p	2	20.76616
MSTO-211H	100	Cisplatin	miR-31-3p	2	17.48433
MSTO-211H	200	Cisplatin	miR-31-3p	2	13.80479
MSTO-211H	400	Cisplatin	miR-31-3p	2	6.354251
MSTO-211H	0	Cisplatin	miR-31-3p	3	88.69599
MSTO-211H	1.5625	Cisplatin	miR-31-3p	3	70.8134
MSTO-211H	3.125	Cisplatin	miR-31-3p	3	64.47159
MSTO-211H	6.25	Cisplatin	miR-31-3p	3	51.37782
MSTO-211H	12.5	Cisplatin	miR-31-3p	3	39.5194
MSTO-211H	25	Cisplatin	miR-31-3p	3	27.28329
MSTO-211H	50	Cisplatin	miR-31-3p	3	21.98474
MSTO-211H	100	Cisplatin	miR-31-3p	3	17.58715
MSTO-211H	200	Cisplatin	miR-31-3p	3	13.4996
MSTO-211H	400	Cisplatin	miR-31-3p	3	6.322325
MSTO-211H	0	Cisplatin	miR-145-3p	1	72.26628
MSTO-211H	1.5625	Cisplatin	miR-145-3p	1	58.72068
MSTO-211H	3.125	Cisplatin	miR-145-3p	1	48.70203
MSTO-211H	6.25	Cisplatin	miR-145-3p	1	35.7917
MSTO-211H	12.5	Cisplatin	miR-145-3p	1	31.31997
MSTO-211H	25	Cisplatin	miR-145-3p	1	26.09339
MSTO-211H	50	Cisplatin	miR-145-3p	1	19.94584
MSTO-211H	100	Cisplatin	miR-145-3p	1	16.82959
MSTO-211H	200	Cisplatin	miR-145-3p	1	12.85135
MSTO-211H	400	Cisplatin	miR-145-3p	1	6.421348
MSTO-211H	0	Cisplatin	miR-145-3p	2	71.21652
MSTO-211H	1.5625	Cisplatin	miR-145-3p	2	55.91881
MSTO-211H	3.125	Cisplatin	miR-145-3p	2	48.01266
MSTO-211H	6.25	Cisplatin	miR-145-3p	2	36.89556
MSTO-211H	12.5	Cisplatin	miR-145-3p	2	30.3135
MSTO-211H	25	Cisplatin	miR-145-3p	2	24.61129
MSTO-211H	50	Cisplatin	miR-145-3p	2	20.05948
MSTO-211H	100	Cisplatin	miR-145-3p	2	15.97356
MSTO-211H	200	Cisplatin	miR-145-3p	2	12.90222
MSTO-211H	400	Cisplatin	miR-145-3p	2	6.384012
MSTO-211H	0	Cisplatin	miR-145-3p	3	69.80964
MSTO-211H	1.5625	Cisplatin	miR-145-3p	3	57.03729
MSTO-211H	3.125	Cisplatin	miR-145-3p	3	43.53227
MSTO-211H	6.25	Cisplatin	miR-145-3p	3	34.1148
MSTO-211H	12.5	Cisplatin	miR-145-3p	3	28.90175
MSTO-211H	25	Cisplatin	miR-145-3p	3	24.30665
MSTO-211H	50	Cisplatin	miR-145-3p	3	20.03134
MSTO-211H	100	Cisplatin	miR-145-3p	3	15.47087
MSTO-211H	200	Cisplatin	miR-145-3p	3	12.52182
MSTO-211H	400	Cisplatin	miR-145-3p	3	6.233042
MSTO-211H	0	Cisplatin	miR-145-5p	1	92.73104
MSTO-211H	1.5625	Cisplatin	miR-145-5p	1	81.58581
MSTO-211H	3.125	Cisplatin	miR-145-5p	1	63.3634
MSTO-211H	6.25	Cisplatin	miR-145-5p	1	49.6625
MSTO-211H	12.5	Cisplatin	miR-145-5p	1	33.30043
MSTO-211H	25	Cisplatin	miR-145-5p	1	23.93599
MSTO-211H	50	Cisplatin	miR-145-5p	1	19.20128
MSTO-211H	100	Cisplatin	miR-145-5p	1	15.63969
MSTO-211H	200	Cisplatin	miR-145-5p	1	12.66088
MSTO-211H	400	Cisplatin	miR-145-5p	1	6.118327
MSTO-211H	0	Cisplatin	miR-145-5p	2	94.62655
MSTO-211H	1.5625	Cisplatin	miR-145-5p	2	76.43336
MSTO-211H	3.125	Cisplatin	miR-145-5p	2	65.76268
MSTO-211H	6.25	Cisplatin	miR-145-5p	2	46.06034
MSTO-211H	12.5	Cisplatin	miR-145-5p	2	32.46712
MSTO-211H	25	Cisplatin	miR-145-5p	2	24.42082
MSTO-211H	50	Cisplatin	miR-145-5p	2	19.44261
MSTO-211H	100	Cisplatin	miR-145-5p	2	15.34695
MSTO-211H	200	Cisplatin	miR-145-5p	2	12.01209
MSTO-211H	400	Cisplatin	miR-145-5p	2	6.265509
MSTO-211H	0	Cisplatin	miR-145-5p	3	100.5176
MSTO-211H	1.5625	Cisplatin	miR-145-5p	3	79.97817
MSTO-211H	3.125	Cisplatin	miR-145-5p	3	65.65879
MSTO-211H	6.25	Cisplatin	miR-145-5p	3	45.6637
MSTO-211H	12.5	Cisplatin	miR-145-5p	3	30.73936
MSTO-211H	25	Cisplatin	miR-145-5p	3	23.22875
MSTO-211H	50	Cisplatin	miR-145-5p	3	19.03624
MSTO-211H	100	Cisplatin	miR-145-5p	3	16.40212
MSTO-211H	200	Cisplatin	miR-145-5p	3	12.669
MSTO-211H	400	Cisplatin	miR-145-5p	3	6.255769
MSTO-211H	0	Cisplatin	miR-15a-5p	1	73.63799
MSTO-211H	1.5625	Cisplatin	miR-15a-5p	1	59.0632
MSTO-211H	3.125	Cisplatin	miR-15a-5p	1	47.27026
MSTO-211H	6.25	Cisplatin	miR-15a-5p	1	40.71038
MSTO-211H	12.5	Cisplatin	miR-15a-5p	1	30.83297
MSTO-211H	25	Cisplatin	miR-15a-5p	1	26.15183
MSTO-211H	50	Cisplatin	miR-15a-5p	1	19.97669
MSTO-211H	100	Cisplatin	miR-15a-5p	1	16.77765
MSTO-211H	200	Cisplatin	miR-15a-5p	1	13.20362
MSTO-211H	400	Cisplatin	miR-15a-5p	1	6.434876
MSTO-211H	0	Cisplatin	miR-15a-5p	2	69.33563
MSTO-211H	1.5625	Cisplatin	miR-15a-5p	2	57.81594
MSTO-211H	3.125	Cisplatin	miR-15a-5p	2	50.12569
MSTO-211H	6.25	Cisplatin	miR-15a-5p	2	39.34462
MSTO-211H	12.5	Cisplatin	miR-15a-5p	2	32.3524
MSTO-211H	25	Cisplatin	miR-15a-5p	2	25.59665
MSTO-211H	50	Cisplatin	miR-15a-5p	2	19.77539
MSTO-211H	100	Cisplatin	miR-15a-5p	2	16.06284
MSTO-211H	200	Cisplatin	miR-15a-5p	2	13.36703
MSTO-211H	400	Cisplatin	miR-15a-5p	2	6.432711
MSTO-211H	0	Cisplatin	miR-15a-5p	3	73.5671
MSTO-211H	1.5625	Cisplatin	miR-15a-5p	3	55.00055
MSTO-211H	3.125	Cisplatin	miR-15a-5p	3	44.55605
MSTO-211H	6.25	Cisplatin	miR-15a-5p	3	36.11745
MSTO-211H	12.5	Cisplatin	miR-15a-5p	3	29.69393
MSTO-211H	25	Cisplatin	miR-15a-5p	3	23.92408
MSTO-211H	50	Cisplatin	miR-15a-5p	3	19.28028
MSTO-211H	100	Cisplatin	miR-15a-5p	3	16.10992
MSTO-211H	200	Cisplatin	miR-15a-5p	3	12.84757
MSTO-211H	400	Cisplatin	miR-15a-5p	3	6.354251
MSTO-211H	0	Cisplatin	miR-16-5p	1	47.82814
MSTO-211H	1.5625	Cisplatin	miR-16-5p	1	46.85414
MSTO-211H	3.125	Cisplatin	miR-16-5p	1	42.81638
MSTO-211H	6.25	Cisplatin	miR-16-5p	1	34.96813
MSTO-211H	12.5	Cisplatin	miR-16-5p	1	29.88927
MSTO-211H	25	Cisplatin	miR-16-5p	1	24.21953
MSTO-211H	50	Cisplatin	miR-16-5p	1	18.56114
MSTO-211H	100	Cisplatin	miR-16-5p	1	15.89672
MSTO-211H	200	Cisplatin	miR-16-5p	1	12.30105
MSTO-211H	400	Cisplatin	miR-16-5p	1	6.239535
MSTO-211H	0	Cisplatin	miR-16-5p	2	42.46196
MSTO-211H	1.5625	Cisplatin	miR-16-5p	2	42.95004
MSTO-211H	3.125	Cisplatin	miR-16-5p	2	39.57947
MSTO-211H	6.25	Cisplatin	miR-16-5p	2	33.85885
MSTO-211H	12.5	Cisplatin	miR-16-5p	2	27.83252
MSTO-211H	25	Cisplatin	miR-16-5p	2	23.32399
MSTO-211H	50	Cisplatin	miR-16-5p	2	18.04871
MSTO-211H	100	Cisplatin	miR-16-5p	2	15.4476
MSTO-211H	200	Cisplatin	miR-16-5p	2	12.18254
MSTO-211H	400	Cisplatin	miR-16-5p	2	6.241159
MSTO-211H	0	Cisplatin	miR-16-5p	3	47.78215
MSTO-211H	1.5625	Cisplatin	miR-16-5p	3	44.69079
MSTO-211H	3.125	Cisplatin	miR-16-5p	3	39.26562
MSTO-211H	6.25	Cisplatin	miR-16-5p	3	32.06129
MSTO-211H	12.5	Cisplatin	miR-16-5p	3	28.9261
MSTO-211H	25	Cisplatin	miR-16-5p	3	23.13514
MSTO-211H	50	Cisplatin	miR-16-5p	3	18.02436
MSTO-211H	100	Cisplatin	miR-16-5p	3	15.90267
MSTO-211H	200	Cisplatin	miR-16-5p	3	11.81351
MSTO-211H	400	Cisplatin	miR-16-5p	3	6.321784
MSTO-211H	0	Cisplatin	miR-34a-5p	1	84.28919
MSTO-211H	1.5625	Cisplatin	miR-34a-5p	1	74.96533
MSTO-211H	3.125	Cisplatin	miR-34a-5p	1	68.4547
MSTO-211H	6.25	Cisplatin	miR-34a-5p	1	48.57704
MSTO-211H	12.5	Cisplatin	miR-34a-5p	1	36.7592
MSTO-211H	25	Cisplatin	miR-34a-5p	1	28.28813
MSTO-211H	50	Cisplatin	miR-34a-5p	1	21.44255
MSTO-211H	100	Cisplatin	miR-34a-5p	1	17.00383
MSTO-211H	200	Cisplatin	miR-34a-5p	1	12.77127
MSTO-211H	400	Cisplatin	miR-34a-5p	1	6.551756
MSTO-211H	0	Cisplatin	miR-34a-5p	2	86.89788
MSTO-211H	1.5625	Cisplatin	miR-34a-5p	2	77.59134
MSTO-211H	3.125	Cisplatin	miR-34a-5p	2	68.27884
MSTO-211H	6.25	Cisplatin	miR-34a-5p	2	48.72692
MSTO-211H	12.5	Cisplatin	miR-34a-5p	2	36.54222
MSTO-211H	25	Cisplatin	miR-34a-5p	2	27.73782
MSTO-211H	50	Cisplatin	miR-34a-5p	2	21.20338
MSTO-211H	100	Cisplatin	miR-34a-5p	2	16.62235
MSTO-211H	200	Cisplatin	miR-34a-5p	2	12.91899
MSTO-211H	400	Cisplatin	miR-34a-5p	2	6.390505
MSTO-211H	0	Cisplatin	miR-34a-5p	3	79.98033
MSTO-211H	1.5625	Cisplatin	miR-34a-5p	3	73.85822
MSTO-211H	3.125	Cisplatin	miR-34a-5p	3	68.50015
MSTO-211H	6.25	Cisplatin	miR-34a-5p	3	48.62249
MSTO-211H	12.5	Cisplatin	miR-34a-5p	3	37.5265
MSTO-211H	25	Cisplatin	miR-34a-5p	3	27.11392
MSTO-211H	50	Cisplatin	miR-34a-5p	3	20.61033
MSTO-211H	100	Cisplatin	miR-34a-5p	3	16.15375
MSTO-211H	200	Cisplatin	miR-34a-5p	3	12.83837
MSTO-211H	400	Cisplatin	miR-34a-5p	3	6.355874
MSTO-211H	0	Cisplatin	miR-34b-3p	1	66.10466
MSTO-211H	1.5625	Cisplatin	miR-34b-3p	1	57.48154
MSTO-211H	3.125	Cisplatin	miR-34b-3p	1	49.18091
MSTO-211H	6.25	Cisplatin	miR-34b-3p	1	42.84506
MSTO-211H	12.5	Cisplatin	miR-34b-3p	1	32.75878
MSTO-211H	25	Cisplatin	miR-34b-3p	1	25.27902
MSTO-211H	50	Cisplatin	miR-34b-3p	1	20.36791
MSTO-211H	100	Cisplatin	miR-34b-3p	1	17.21107
MSTO-211H	200	Cisplatin	miR-34b-3p	1	12.14358
MSTO-211H	400	Cisplatin	miR-34b-3p	1	6.428924
MSTO-211H	0	Cisplatin	miR-34b-3p	2	67.89465
MSTO-211H	1.5625	Cisplatin	miR-34b-3p	2	51.91081
MSTO-211H	3.125	Cisplatin	miR-34b-3p	2	48.65387
MSTO-211H	6.25	Cisplatin	miR-34b-3p	2	39.37168
MSTO-211H	12.5	Cisplatin	miR-34b-3p	2	31.45308
MSTO-211H	25	Cisplatin	miR-34b-3p	2	24.05719
MSTO-211H	50	Cisplatin	miR-34b-3p	2	20.15904
MSTO-211H	100	Cisplatin	miR-34b-3p	2	16.19487
MSTO-211H	200	Cisplatin	miR-34b-3p	2	12.59974
MSTO-211H	400	Cisplatin	miR-34b-3p	2	6.379683
MSTO-211H	0	Cisplatin	miR-34b-3p	3	61.26714
MSTO-211H	1.5625	Cisplatin	miR-34b-3p	3	49.58566
MSTO-211H	3.125	Cisplatin	miR-34b-3p	3	44.8634
MSTO-211H	6.25	Cisplatin	miR-34b-3p	3	40.28994
MSTO-211H	12.5	Cisplatin	miR-34b-3p	3	33.54014
MSTO-211H	25	Cisplatin	miR-34b-3p	3	24.73142
MSTO-211H	50	Cisplatin	miR-34b-3p	3	19.16773
MSTO-211H	100	Cisplatin	miR-34b-3p	3	15.67432
MSTO-211H	200	Cisplatin	miR-34b-3p	3	12.32215
MSTO-211H	400	Cisplatin	miR-34b-3p	3	6.487905
MSTO-211H	0	Gemcitabine	C81	1	106.2455
MSTO-211H	0.03125	Gemcitabine	C81	1	82.21712
MSTO-211H	0.0625	Gemcitabine	C81	1	82.03722
MSTO-211H	0.125	Gemcitabine	C81	1	64.63544
MSTO-211H	0.25	Gemcitabine	C81	1	42.72297
MSTO-211H	0.5	Gemcitabine	C81	1	18.97631
MSTO-211H	1	Gemcitabine	C81	1	18.18245
MSTO-211H	2	Gemcitabine	C81	1	17.30386
MSTO-211H	4	Gemcitabine	C81	1	17.91562
MSTO-211H	8	Gemcitabine	C81	1	18.82887
MSTO-211H	0	Gemcitabine	C81	2	105.5138
MSTO-211H	0.03125	Gemcitabine	C81	2	103.7687
MSTO-211H	0.0625	Gemcitabine	C81	2	96.74107
MSTO-211H	0.125	Gemcitabine	C81	2	102.7828
MSTO-211H	0.25	Gemcitabine	C81	2	60.0956
MSTO-211H	0.5	Gemcitabine	C81	2	18.31338
MSTO-211H	1	Gemcitabine	C81	2	16.20796
MSTO-211H	2	Gemcitabine	C81	2	16.08748
MSTO-211H	4	Gemcitabine	C81	2	16.67064
MSTO-211H	8	Gemcitabine	C81	2	14.40897
MSTO-211H	0	Gemcitabine	C81	3	108.5704
MSTO-211H	0.03125	Gemcitabine	C81	3	102.1743
MSTO-211H	0.0625	Gemcitabine	C81	3	95.76345
MSTO-211H	0.125	Gemcitabine	C81	3	93.58541
MSTO-211H	0.25	Gemcitabine	C81	3	58.46166
MSTO-211H	0.5	Gemcitabine	C81	3	19.78723
MSTO-211H	1	Gemcitabine	C81	3	16.80212
MSTO-211H	2	Gemcitabine	C81	3	16.04236
MSTO-211H	4	Gemcitabine	C81	3	15.21989
MSTO-211H	8	Gemcitabine	C81	3	15.49827
MSTO-211H	0	Gemcitabine	miR-486-5p	1	95.51479
MSTO-211H	0.03125	Gemcitabine	miR-486-5p	1	93.05452
MSTO-211H	0.0625	Gemcitabine	miR-486-5p	1	90.34668
MSTO-211H	0.125	Gemcitabine	miR-486-5p	1	87.08979
MSTO-211H	0.25	Gemcitabine	miR-486-5p	1	60.01528
MSTO-211H	0.5	Gemcitabine	miR-486-5p	1	16.60957
MSTO-211H	1	Gemcitabine	miR-486-5p	1	12.54286
MSTO-211H	2	Gemcitabine	miR-486-5p	1	12.15446
MSTO-211H	4	Gemcitabine	miR-486-5p	1	11.50583
MSTO-211H	8	Gemcitabine	miR-486-5p	1	10.91992
MSTO-211H	0	Gemcitabine	miR-486-5p	2	97.06126
MSTO-211H	0.03125	Gemcitabine	miR-486-5p	2	95.48508
MSTO-211H	0.0625	Gemcitabine	miR-486-5p	2	90.2218
MSTO-211H	0.125	Gemcitabine	miR-486-5p	2	86.61612
MSTO-211H	0.25	Gemcitabine	miR-486-5p	2	58.8044
MSTO-211H	0.5	Gemcitabine	miR-486-5p	2	13.16013
MSTO-211H	1	Gemcitabine	miR-486-5p	2	12.32885
MSTO-211H	2	Gemcitabine	miR-486-5p	2	12.68425
MSTO-211H	4	Gemcitabine	miR-486-5p	2	10.93478
MSTO-211H	8	Gemcitabine	miR-486-5p	2	10.79064
MSTO-211H	0	Gemcitabine	miR-486-5p	3	100.8688
MSTO-211H	0.03125	Gemcitabine	miR-486-5p	3	98.59397
MSTO-211H	0.0625	Gemcitabine	miR-486-5p	3	92.93183
MSTO-211H	0.125	Gemcitabine	miR-486-5p	3	86.63372
MSTO-211H	0.25	Gemcitabine	miR-486-5p	3	60.13191
MSTO-211H	0.5	Gemcitabine	miR-486-5p	3	15.33377
MSTO-211H	1	Gemcitabine	miR-486-5p	3	12.34591
MSTO-211H	2	Gemcitabine	miR-486-5p	3	11.5768
MSTO-211H	4	Gemcitabine	miR-486-5p	3	11.19225
MSTO-211H	8	Gemcitabine	miR-486-5p	3	10.55627
MSTO-211H	0	Gemcitabine	miR-31-5p	1	107.6577
MSTO-211H	0.03125	Gemcitabine	miR-31-5p	1	99.50007
MSTO-211H	0.0625	Gemcitabine	miR-31-5p	1	96.35872
MSTO-211H	0.125	Gemcitabine	miR-31-5p	1	93.98097
MSTO-211H	0.25	Gemcitabine	miR-31-5p	1	70.64142
MSTO-211H	0.5	Gemcitabine	miR-31-5p	1	19.87691
MSTO-211H	1	Gemcitabine	miR-31-5p	1	17.02548
MSTO-211H	2	Gemcitabine	miR-31-5p	1	17.26425
MSTO-211H	4	Gemcitabine	miR-31-5p	1	17.84466
MSTO-211H	8	Gemcitabine	miR-31-5p	1	14.39742
MSTO-211H	0	Gemcitabine	miR-31-5p	2	98.81348
MSTO-211H	0.03125	Gemcitabine	miR-31-5p	2	97.13388
MSTO-211H	0.0625	Gemcitabine	miR-31-5p	2	94.67031
MSTO-211H	0.125	Gemcitabine	miR-31-5p	2	96.78783
MSTO-211H	0.25	Gemcitabine	miR-31-5p	2	66.27928
MSTO-211H	0.5	Gemcitabine	miR-31-5p	2	16.18155
MSTO-211H	1	Gemcitabine	miR-31-5p	2	17.27525
MSTO-211H	2	Gemcitabine	miR-31-5p	2	16.69594
MSTO-211H	4	Gemcitabine	miR-31-5p	2	17.01723
MSTO-211H	8	Gemcitabine	miR-31-5p	2	12.78383
MSTO-211H	0	Gemcitabine	miR-31-5p	3	102.4709
MSTO-211H	0.03125	Gemcitabine	miR-31-5p	3	97.64772
MSTO-211H	0.0625	Gemcitabine	miR-31-5p	3	93.76971
MSTO-211H	0.125	Gemcitabine	miR-31-5p	3	90.54583
MSTO-211H	0.25	Gemcitabine	miR-31-5p	3	59.8926
MSTO-211H	0.5	Gemcitabine	miR-31-5p	3	19.78833
MSTO-211H	1	Gemcitabine	miR-31-5p	3	15.7948
MSTO-211H	2	Gemcitabine	miR-31-5p	3	15.90593
MSTO-211H	4	Gemcitabine	miR-31-5p	3	14.44198
MSTO-211H	8	Gemcitabine	miR-31-5p	3	12.31455
MSTO-211H	0	Gemcitabine	miR-31-3p	1	86.88514
MSTO-211H	0.03125	Gemcitabine	miR-31-3p	1	84.34785
MSTO-211H	0.0625	Gemcitabine	miR-31-3p	1	82.53621
MSTO-211H	0.125	Gemcitabine	miR-31-3p	1	78.22193
MSTO-211H	0.25	Gemcitabine	miR-31-3p	1	58.37308
MSTO-211H	0.5	Gemcitabine	miR-31-3p	1	26.78129
MSTO-211H	1	Gemcitabine	miR-31-3p	1	24.37878
MSTO-211H	2	Gemcitabine	miR-31-3p	1	23.74831
MSTO-211H	4	Gemcitabine	miR-31-3p	1	23.26143
MSTO-211H	8	Gemcitabine	miR-31-3p	1	19.54627
MSTO-211H	0	Gemcitabine	miR-31-3p	2	83.33502
MSTO-211H	0.03125	Gemcitabine	miR-31-3p	2	83.90773
MSTO-211H	0.0625	Gemcitabine	miR-31-3p	2	81.82816
MSTO-211H	0.125	Gemcitabine	miR-31-3p	2	76.09615
MSTO-211H	0.25	Gemcitabine	miR-31-3p	2	62.00572
MSTO-211H	0.5	Gemcitabine	miR-31-3p	2	26.58268
MSTO-211H	1	Gemcitabine	miR-31-3p	2	24.31331
MSTO-211H	2	Gemcitabine	miR-31-3p	2	23.22567
MSTO-211H	4	Gemcitabine	miR-31-3p	2	22.2255
MSTO-211H	8	Gemcitabine	miR-31-3p	2	17.37318
MSTO-211H	0	Gemcitabine	miR-31-3p	3	87.67405
MSTO-211H	0.03125	Gemcitabine	miR-31-3p	3	101.6468
MSTO-211H	0.0625	Gemcitabine	miR-31-3p	3	82.23692
MSTO-211H	0.125	Gemcitabine	miR-31-3p	3	73.95827
MSTO-211H	0.25	Gemcitabine	miR-31-3p	3	58.70317
MSTO-211H	0.5	Gemcitabine	miR-31-3p	3	26.56728
MSTO-211H	1	Gemcitabine	miR-31-3p	3	23.68449
MSTO-211H	2	Gemcitabine	miR-31-3p	3	23.77472
MSTO-211H	4	Gemcitabine	miR-31-3p	3	22.45876
MSTO-211H	8	Gemcitabine	miR-31-3p	3	18.81457
MSTO-211H	0	Gemcitabine	miR-145-3p	1	72.12737
MSTO-211H	0.03125	Gemcitabine	miR-145-3p	1	69.55872
MSTO-211H	0.0625	Gemcitabine	miR-145-3p	1	76.17868
MSTO-211H	0.125	Gemcitabine	miR-145-3p	1	67.6222
MSTO-211H	0.25	Gemcitabine	miR-145-3p	1	47.21605
MSTO-211H	0.5	Gemcitabine	miR-145-3p	1	16.27013
MSTO-211H	1	Gemcitabine	miR-145-3p	1	13.30812
MSTO-211H	2	Gemcitabine	miR-145-3p	1	14.45958
MSTO-211H	4	Gemcitabine	miR-145-3p	1	12.98628
MSTO-211H	8	Gemcitabine	miR-145-3p	1	11.79686
MSTO-211H	0	Gemcitabine	miR-145-3p	2	73.48954
MSTO-211H	0.03125	Gemcitabine	miR-145-3p	2	75.18896
MSTO-211H	0.0625	Gemcitabine	miR-145-3p	2	73.38447
MSTO-211H	0.125	Gemcitabine	miR-145-3p	2	75.02831
MSTO-211H	0.25	Gemcitabine	miR-145-3p	2	46.63234
MSTO-211H	0.5	Gemcitabine	miR-145-3p	2	16.36695
MSTO-211H	1	Gemcitabine	miR-145-3p	2	14.36386
MSTO-211H	2	Gemcitabine	miR-145-3p	2	14.48104
MSTO-211H	4	Gemcitabine	miR-145-3p	2	12.56102
MSTO-211H	8	Gemcitabine	miR-145-3p	2	11.61366
MSTO-211H	0	Gemcitabine	miR-145-3p	3	69.03663
MSTO-211H	0.03125	Gemcitabine	miR-145-3p	3	68.44742
MSTO-211H	0.0625	Gemcitabine	miR-145-3p	3	69.99829
MSTO-211H	0.125	Gemcitabine	miR-145-3p	3	62.07394
MSTO-211H	0.25	Gemcitabine	miR-145-3p	3	35.61174
MSTO-211H	0.5	Gemcitabine	miR-145-3p	3	14.92941
MSTO-211H	1	Gemcitabine	miR-145-3p	3	13.19149
MSTO-211H	2	Gemcitabine	miR-145-3p	3	14.98608
MSTO-211H	4	Gemcitabine	miR-145-3p	3	12.40533
MSTO-211H	8	Gemcitabine	miR-145-3p	3	11.7622
MSTO-211H	0	Gemcitabine	miR-145-5p	1	94.61419
MSTO-211H	0.03125	Gemcitabine	miR-145-5p	1	87.16957
MSTO-211H	0.0625	Gemcitabine	miR-145-5p	1	85.34197
MSTO-211H	0.125	Gemcitabine	miR-145-5p	1	83.29266
MSTO-211H	0.25	Gemcitabine	miR-145-5p	1	45.38955
MSTO-211H	0.5	Gemcitabine	miR-145-5p	1	15.23695
MSTO-211H	1	Gemcitabine	miR-145-5p	1	13.48747
MSTO-211H	2	Gemcitabine	miR-145-5p	1	13.4121
MSTO-211H	4	Gemcitabine	miR-145-5p	1	12.32775
MSTO-211H	8	Gemcitabine	miR-145-5p	1	10.91497
MSTO-211H	0	Gemcitabine	miR-145-5p	2	96.669
MSTO-211H	0.03125	Gemcitabine	miR-145-5p	2	88.60491
MSTO-211H	0.0625	Gemcitabine	miR-145-5p	2	88.24401
MSTO-211H	0.125	Gemcitabine	miR-145-5p	2	86.15564
MSTO-211H	0.25	Gemcitabine	miR-145-5p	2	60.95658
MSTO-211H	0.5	Gemcitabine	miR-145-5p	2	15.56428
MSTO-211H	1	Gemcitabine	miR-145-5p	2	13.0578
MSTO-211H	2	Gemcitabine	miR-145-5p	2	12.25954
MSTO-211H	4	Gemcitabine	miR-145-5p	2	11.93
MSTO-211H	8	Gemcitabine	miR-145-5p	2	11.60431
MSTO-211H	0	Gemcitabine	miR-145-5p	3	107.0729
MSTO-211H	0.03125	Gemcitabine	miR-145-5p	3	91.61423
MSTO-211H	0.0625	Gemcitabine	miR-145-5p	3	90.91278
MSTO-211H	0.125	Gemcitabine	miR-145-5p	3	86.9242
MSTO-211H	0.25	Gemcitabine	miR-145-5p	3	53.3051
MSTO-211H	0.5	Gemcitabine	miR-145-5p	3	12.59238
MSTO-211H	1	Gemcitabine	miR-145-5p	3	12.11375
MSTO-211H	2	Gemcitabine	miR-145-5p	3	13.00829
MSTO-211H	4	Gemcitabine	miR-145-5p	3	11.9586
MSTO-211H	8	Gemcitabine	miR-145-5p	3	11.33969
MSTO-211H	0	Gemcitabine	miR-15a-5p	1	101.020402
MSTO-211H	0.03125	Gemcitabine	miR-15a-5p	1	98.5980221
MSTO-211H	0.0625	Gemcitabine	miR-15a-5p	1	91.8674909
MSTO-211H	0.125	Gemcitabine	miR-15a-5p	1	62.7465932
MSTO-211H	0.25	Gemcitabine	miR-15a-5p	1	42.1505044
MSTO-211H	0.5	Gemcitabine	miR-15a-5p	1	17.0964515
MSTO-211H	1	Gemcitabine	miR-15a-5p	1	18.6572261
MSTO-211H	2	Gemcitabine	miR-15a-5p	1	16.2767284
MSTO-211H	4	Gemcitabine	miR-15a-5p	1	19.248637
MSTO-211H	8	Gemcitabine	miR-15a-5p	1	15.984599
MSTO-211H	0	Gemcitabine	miR-15a-5p	2	98.1316367
MSTO-211H	0.03125	Gemcitabine	miR-15a-5p	2	93.0921949
MSTO-211H	0.0625	Gemcitabine	miR-15a-5p	2	91.1573184
MSTO-211H	0.125	Gemcitabine	miR-15a-5p	2	66.3131122
MSTO-211H	0.25	Gemcitabine	miR-15a-5p	2	35.9621135
MSTO-211H	0.5	Gemcitabine	miR-15a-5p	2	20.6372148
MSTO-211H	1	Gemcitabine	miR-15a-5p	2	27.5283897
MSTO-211H	2	Gemcitabine	miR-15a-5p	2	24.5812379
MSTO-211H	4	Gemcitabine	miR-15a-5p	2	17.7186707
MSTO-211H	8	Gemcitabine	miR-15a-5p	2	15.7969979
MSTO-211H	0	Gemcitabine	miR-15a-5p	3	101.814339
MSTO-211H	0.03125	Gemcitabine	miR-15a-5p	3	96.7689866
MSTO-211H	0.0625	Gemcitabine	miR-15a-5p	3	95.6697169
MSTO-211H	0.125	Gemcitabine	miR-15a-5p	3	55.7727332
MSTO-211H	0.25	Gemcitabine	miR-15a-5p	3	38.2226786
MSTO-211H	0.5	Gemcitabine	miR-15a-5p	3	25.0180567
MSTO-211H	1	Gemcitabine	miR-15a-5p	3	26.7983411
MSTO-211H	2	Gemcitabine	miR-15a-5p	3	25.721148
MSTO-211H	4	Gemcitabine	miR-15a-5p	3	18.179146
MSTO-211H	8	Gemcitabine	miR-15a-5p	3	11.1944457
MSTO-211H	0	Gemcitabine	miR-16-5p	1	101.780054
MSTO-211H	0.03125	Gemcitabine	miR-16-5p	1	91.3520714
MSTO-211H	0.0625	Gemcitabine	miR-16-5p	1	67.7476322
MSTO-211H	0.125	Gemcitabine	miR-16-5p	1	32.0463603
MSTO-211H	0.25	Gemcitabine	miR-16-5p	1	22.5264995
MSTO-211H	0.5	Gemcitabine	miR-16-5p	1	27.4310132
MSTO-211H	1	Gemcitabine	miR-16-5p	1	15.8278063
MSTO-211H	2	Gemcitabine	miR-16-5p	1	11.890385
MSTO-211H	4	Gemcitabine	miR-16-5p	1	15.8091012
MSTO-211H	8	Gemcitabine	miR-16-5p	1	11.2318559
MSTO-211H	0	Gemcitabine	miR-16-5p	2	95.7598707
MSTO-211H	0.03125	Gemcitabine	miR-16-5p	2	97.7983167
MSTO-211H	0.0625	Gemcitabine	miR-16-5p	2	83.3405246
MSTO-211H	0.125	Gemcitabine	miR-16-5p	2	31.4237324
MSTO-211H	0.25	Gemcitabine	miR-16-5p	2	25.4120346
MSTO-211H	0.5	Gemcitabine	miR-16-5p	2	22.1407739
MSTO-211H	1	Gemcitabine	miR-16-5p	2	15.4839627
MSTO-211H	2	Gemcitabine	miR-16-5p	2	14.1377465
MSTO-211H	4	Gemcitabine	miR-16-5p	2	13.9886559
MSTO-211H	8	Gemcitabine	miR-16-5p	2	11.1410812
MSTO-211H	0	Gemcitabine	miR-16-5p	3	104.714657
MSTO-211H	0.03125	Gemcitabine	miR-16-5p	3	98.3749781
MSTO-211H	0.0625	Gemcitabine	miR-16-5p	3	76.7293759
MSTO-211H	0.125	Gemcitabine	miR-16-5p	3	34.9700679
MSTO-211H	0.25	Gemcitabine	miR-16-5p	3	22.8500583
MSTO-211H	0.5	Gemcitabine	miR-16-5p	3	22.563839
MSTO-211H	1	Gemcitabine	miR-16-5p	3	12.3123498
MSTO-211H	2	Gemcitabine	miR-16-5p	3	12.0246216
MSTO-211H	4	Gemcitabine	miR-16-5p	3	16.0506169
MSTO-211H	8	Gemcitabine	miR-16-5p	3	11.6455684
MSTO-211H	0	Gemcitabine	miR-34a-5p	1	122.880882
MSTO-211H	0.03125	Gemcitabine	miR-34a-5p	1	118.412017
MSTO-211H	0.0625	Gemcitabine	miR-34a-5p	1	94.3930316
MSTO-211H	0.125	Gemcitabine	miR-34a-5p	1	48.81416
MSTO-211H	0.25	Gemcitabine	miR-34a-5p	1	37.9978088
MSTO-211H	0.5	Gemcitabine	miR-34a-5p	1	23.8844104
MSTO-211H	1	Gemcitabine	miR-34a-5p	1	12.0823967
MSTO-211H	2	Gemcitabine	miR-34a-5p	1	11.6095415
MSTO-211H	4	Gemcitabine	miR-34a-5p	1	14.0026219
MSTO-211H	8	Gemcitabine	miR-34a-5p	1	11.179014
MSTO-211H	0	Gemcitabine	miR-34a-5p	2	117.410744
MSTO-211H	0.03125	Gemcitabine	miR-34a-5p	2	121.840549
MSTO-211H	0.0625	Gemcitabine	miR-34a-5p	2	108.02299
MSTO-211H	0.125	Gemcitabine	miR-34a-5p	2	50.0916785
MSTO-211H	0.25	Gemcitabine	miR-34a-5p	2	32.5095156
MSTO-211H	0.5	Gemcitabine	miR-34a-5p	2	27.4829395
MSTO-211H	1	Gemcitabine	miR-34a-5p	2	12.8347248
MSTO-211H	2	Gemcitabine	miR-34a-5p	2	14.5000955
MSTO-211H	4	Gemcitabine	miR-34a-5p	2	15.2619145
MSTO-211H	8	Gemcitabine	miR-34a-5p	2	11.7028241
MSTO-211H	0	Gemcitabine	miR-34a-5p	3	113.861178
MSTO-211H	0.03125	Gemcitabine	miR-34a-5p	3	105.881807
MSTO-211H	0.0625	Gemcitabine	miR-34a-5p	3	115.536934
MSTO-211H	0.125	Gemcitabine	miR-34a-5p	3	50.4993394
MSTO-211H	0.25	Gemcitabine	miR-34a-5p	3	33.7241754
MSTO-211H	0.5	Gemcitabine	miR-34a-5p	3	25.0180567
MSTO-211H	1	Gemcitabine	miR-34a-5p	3	16.7983411
MSTO-211H	2	Gemcitabine	miR-34a-5p	3	15.721148
MSTO-211H	4	Gemcitabine	miR-34a-5p	3	16.179146
MSTO-211H	8	Gemcitabine	miR-34a-5p	3	11.1944457
MSTO-211H	0	Gemcitabine	miR-34b-3p	1	83.7657903
MSTO-211H	0.03125	Gemcitabine	miR-34b-3p	1	85.7001166
MSTO-211H	0.0625	Gemcitabine	miR-34b-3p	1	97.3770435
MSTO-211H	0.125	Gemcitabine	miR-34b-3p	1	39.372012
MSTO-211H	0.25	Gemcitabine	miR-34b-3p	1	32.5264995
MSTO-211H	0.5	Gemcitabine	miR-34b-3p	1	27.4310132
MSTO-211H	1	Gemcitabine	miR-34b-3p	1	15.8278063
MSTO-211H	2	Gemcitabine	miR-34b-3p	1	11.890385
MSTO-211H	4	Gemcitabine	miR-34b-3p	1	15.8091012
MSTO-211H	8	Gemcitabine	miR-34b-3p	1	11.2318559
MSTO-211H	0	Gemcitabine	miR-34b-3p	2	93.4599778
MSTO-211H	0.03125	Gemcitabine	miR-34b-3p	2	86.1303336
MSTO-211H	0.0625	Gemcitabine	miR-34b-3p	2	91.9525677
MSTO-211H	0.125	Gemcitabine	miR-34b-3p	2	27.8799353
MSTO-211H	0.25	Gemcitabine	miR-34b-3p	2	35.4120346
MSTO-211H	0.5	Gemcitabine	miR-34b-3p	2	22.1407739
MSTO-211H	1	Gemcitabine	miR-34b-3p	2	15.4839627
MSTO-211H	2	Gemcitabine	miR-34b-3p	2	14.1377465
MSTO-211H	4	Gemcitabine	miR-34b-3p	2	13.9886559
MSTO-211H	8	Gemcitabine	miR-34b-3p	2	11.1410812
MSTO-211H	0	Gemcitabine	miR-34b-3p	3	99.9231362
MSTO-211H	0.03125	Gemcitabine	miR-34b-3p	3	98.7359132
MSTO-211H	0.0625	Gemcitabine	miR-34b-3p	3	98.4641393
MSTO-211H	0.125	Gemcitabine	miR-34b-3p	3	41.1181871
MSTO-211H	0.25	Gemcitabine	miR-34b-3p	3	42.8500583
MSTO-211H	0.5	Gemcitabine	miR-34b-3p	3	22.563839
MSTO-211H	1	Gemcitabine	miR-34b-3p	3	12.3123498
MSTO-211H	2	Gemcitabine	miR-34b-3p	3	12.0246216
MSTO-211H	4	Gemcitabine	miR-34b-3p	3	16.0506169
MSTO-211H	8	Gemcitabine	miR-34b-3p	3	11.6455684


##########
data_figure2c_MSTO.txt

cellline	dose	growth	pretreatment	experiment
MSTO-211H	0	100	control	1
MSTO-211H	7.8125	98.144	control	1
MSTO-211H	15.625	100.6441	control	1
MSTO-211H	31.25	100.7445	control	1
MSTO-211H	62.5	95.72673	control	1
MSTO-211H	125	90.76801	control	1
MSTO-211H	250	32.27224	control	1
MSTO-211H	500	11.54992	control	1
MSTO-211H	1000	4.25782	control	1
MSTO-211H	2000	3.347756	control	1
MSTO-211H	0	100	control	2
MSTO-211H	7.8125	99.60395	control	2
MSTO-211H	15.625	98.31283	control	2
MSTO-211H	31.25	101.101	control	2
MSTO-211H	62.5	97.67293	control	2
MSTO-211H	125	92.46772	control	2
MSTO-211H	250	57.18885	control	2
MSTO-211H	500	17.28639	control	2
MSTO-211H	1000	4.882147	control	2
MSTO-211H	2000	3.508425	control	2
MSTO-211H	0	100	control	3
MSTO-211H	7.8125	100.5339	control	3
MSTO-211H	15.625	105.3189	control	3
MSTO-211H	31.25	105.1252	control	3
MSTO-211H	62.5	101.3232	control	3
MSTO-211H	125	104.8002	control	3
MSTO-211H	250	51.07182	control	3
MSTO-211H	500	22.05972	control	3
MSTO-211H	1000	6.903678	control	3
MSTO-211H	2000	3.290189	control	3
MSTO-211H	0	100	GW4896	1
MSTO-211H	7.8125	98.01975	GW4896	1
MSTO-211H	15.625	104.9255	GW4896	1
MSTO-211H	31.25	107.0819	GW4896	1
MSTO-211H	62.5	107.472	GW4896	1
MSTO-211H	125	99.80933	GW4896	1
MSTO-211H	250	77.27772	GW4896	1
MSTO-211H	500	27.32248	GW4896	1
MSTO-211H	1000	14.62225	GW4896	1
MSTO-211H	2000	4.454649	GW4896	1
MSTO-211H	0	100	GW4896	2
MSTO-211H	7.8125	100.6907	GW4896	2
MSTO-211H	15.625	112.7128	GW4896	2
MSTO-211H	31.25	106.7492	GW4896	2
MSTO-211H	62.5	104.4416	GW4896	2
MSTO-211H	125	100.3623	GW4896	2
MSTO-211H	250	79.50857	GW4896	2
MSTO-211H	500	29.3451	GW4896	2
MSTO-211H	1000	9.14011	GW4896	2
MSTO-211H	2000	4.464391	GW4896	2
MSTO-211H	0	100	GW4896	3
MSTO-211H	7.8125	106.7891	GW4896	3
MSTO-211H	15.625	103.3412	GW4896	3
MSTO-211H	31.25	112.4259	GW4896	3
MSTO-211H	62.5	108.5232	GW4896	3
MSTO-211H	125	104.5153	GW4896	3
MSTO-211H	250	94.82669	GW4896	3
MSTO-211H	500	29.97682	GW4896	3
MSTO-211H	1000	14.8378	GW4896	3
MSTO-211H	2000	5.449667	GW4896	3

##########
data_figure3a_mrna_transporters.txt

mrna	cellline	experiment	mrna_expression_levels
OCT1	H226	1	1.265757
MDR1 (ABCB1)	H226	1	2288.204
MRP1	H226	1	1
BCRP (ABCG2)	H226	1	1.443929
IAP1	H226	1	2.027919
IAP2	H226	1	36.25228
ILF3	H226	1	1.189207
Birc5	H226	1	0.959264
ABCG2	H226	1	1.681793
XIAP	H226	1	1.328686
OCT1	H226	2	1.301342
MDR1 (ABCB1)	H226	2	1833.011
MRP1	H226	2	0.972655
BCRP (ABCG2)	H226	2	2.219139
IAP1	H226	2	1.385109
IAP2	H226	2	39.39662
ILF3	H226	2	1.310393
Birc5	H226	2	0.870551
ABCG2	H226	2	1.453973
XIAP	H226	2	1.986185
OCT1	Ren	1	1.125058
MDR1 (ABCB1)	Ren	1	68.11969
MRP1	Ren	1	1.36604
BCRP (ABCG2)	Ren	1	2.907945
IAP1	Ren	1	12.46663
IAP2	Ren	1	222.8609
ILF3	Ren	1	2.496661
Birc5	Ren	1	2.887858
ABCG2	Ren	1	3.655326
XIAP	Ren	1	2.789487
OCT1	Ren	2	0.503478
MDR1 (ABCB1)	Ren	2	51.62507
MRP1	Ren	2	1.049717
BCRP (ABCG2)	Ren	2	4.112455
IAP1	Ren	2	13.26911
IAP2	Ren	2	182.2784
ILF3	Ren	2	3.317278
Birc5	Ren	2	2.158456
ABCG2	Ren	2	3.294364
XIAP	Ren	2	3.758091
OCT1	VMC40	1	2.713209
MDR1 (ABCB1)	VMC40	1	14.3204
MRP1	VMC40	1	0.293209
BCRP (ABCG2)	VMC40	1	0.0000543
IAP1	VMC40	1	0.972655
IAP2	VMC40	1	93.05424
ILF3	VMC40	1	0.952638
Birc5	VMC40	1	1.257013
ABCG2	VMC40	1	0.285191
XIAP	VMC40	1	3.052518
OCT1	VMC40	2	3.271608
MDR1 (ABCB1)	VMC40	2	13.08643
MRP1	VMC40	2	0.185565
BCRP (ABCG2)	VMC40	2	0.0000496
IAP1	VMC40	2	0.673617
IAP2	VMC40	2	83.28588
ILF3	VMC40	2	0.432269
Birc5	VMC40	2	1.189207
ABCG2	VMC40	2	0.234881
XIAP	VMC40	2	2.34567
OCT1	MET5A	1	1
MDR1 (ABCB1)	MET5A	1	1
MRP1	MET5A	1	1
BCRP (ABCG2)	MET5A	1	1
IAP1	MET5A	1	1
IAP2	MET5A	1	1
ILF3	MET5A	1	1
Birc5	MET5A	1	1
ABCG2	MET5A	1	1
XIAP	MET5A	1	1
OCT1	MET5A	2	1.132884
MDR1 (ABCB1)	MET5A	2	4.626753
MRP1	MET5A	2	0.570382
BCRP (ABCG2)	MET5A	2	0.946058
IAP1	MET5A	2	0.193446
IAP2	MET5A	2	0.907519
ILF3	MET5A	2	0.463294
Birc5	MET5A	2	0.97942
ABCG2	MET5A	2	0.678302
XIAP	MET5A	2	0.570382
OCT1	VMC20	1	10.12605
MDR1 (ABCB1)	VMC20	1	10015.87
MRP1	VMC20	1	5.098243
BCRP (ABCG2)	VMC20	1	47.83518
IAP1	VMC20	1	20.25211
IAP2	VMC20	1	494.5594
ILF3	VMC20	1	10.77787
Birc5	VMC20	1	4.40762
ABCG2	VMC20	1	739.2917
XIAP	VMC20	1	29.65082
OCT1	VMC20	2	9.646463
MDR1 (ABCB1)	VMC20	2	13777.25
MRP1	VMC20	2	6.020987
BCRP (ABCG2)	VMC20	2	76.63864
IAP1	VMC20	2	27.28432
IAP2	VMC20	2	512
ILF3	VMC20	2	13.08643
Birc5	VMC20	2	6.868523
ABCG2	VMC20	2	849.2232
XIAP	VMC20	2	25.45717
OCT1	H2052	1	2.056228
MDR1 (ABCB1)	H2052	1	576.0299
MRP1	H2052	1	2.114036
BCRP (ABCG2)	H2052	1	0.373712
IAP1	H2052	1	2.158456
IAP2	H2052	1	335.4607
ILF3	H2052	1	0.291183
Birc5	H2052	1	0.50698
ABCG2	H2052	1	0.619854
XIAP	H2052	1	2.07053
OCT1	H2052	2	0.463294
MDR1 (ABCB1)	H2052	2	765.3628
MRP1	H2052	2	1.591073
BCRP (ABCG2)	H2052	2	0.363493
IAP1	H2052	2	1.729074
IAP2	H2052	2	324.0337
ILF3	H2052	2	0.417544
Birc5	H2052	2	0.368567
ABCG2	H2052	2	0.550953
XIAP	H2052	2	1.905276
OCT1	H2452	1	4.377175
MDR1 (ABCB1)	H2452	1	33.59093
MRP1	H2452	1	1.765406
BCRP (ABCG2)	H2452	1	0.632878
IAP1	H2452	1	1.117287
IAP2	H2452	1	45.88657
ILF3	H2452	1	0.323088
Birc5	H2452	1	0.323088
ABCG2	H2452	1	1.474269
XIAP	H2452	1	0.817902
OCT1	H2452	2	7.516182
MDR1 (ABCB1)	H2452	2	67.18187
MRP1	H2452	2	3.294364
BCRP (ABCG2)	H2452	2	0.986233
IAP1	H2452	2	1.827663
IAP2	H2452	2	57.2816
ILF3	H2452	2	0.406126
Birc5	H2452	2	0.386891
ABCG2	H2452	2	2.34567
XIAP	H2452	2	1.328686
OCT1	H28	1	0.400535
MDR1 (ABCB1)	H28	1	1573.76
MRP1	H28	1	0.993092
BCRP (ABCG2)	H28	1	0.059129
IAP1	H28	1	0.692555
IAP2	H28	1	39.12449
ILF3	H28	1	0.30566
Birc5	H28	1	0.392292
ABCG2	H28	1	0.021051
XIAP	H28	1	0.76313
OCT1	H28	2	0.178006
MDR1 (ABCB1)	H28	2	1112.816
MRP1	H28	2	1.042466
BCRP (ABCG2)	H28	2	0.066986
IAP1	H28	2	0.378929
IAP2	H28	2	20.96629
ILF3	H28	2	0.228458
Birc5	H28	2	0.230047
ABCG2	H28	2	0.015198
XIAP	H28	2	0.378929
OCT1	MSTO	1	0.598739
MDR1 (ABCB1)	MSTO	1	11746.96
MRP1	MSTO	1	3.363586
BCRP (ABCG2)	MSTO	1	1.931873
IAP1	MSTO	1	3.758091
IAP2	MSTO	1	178.5272
ILF3	MSTO	1	1.515717
Birc5	MSTO	1	2.114036
ABCG2	MSTO	1	18.37917
XIAP	MSTO	1	6.868523
OCT1	MSTO	2	0.607097
MDR1 (ABCB1)	MSTO	2	3373.429
MRP1	MSTO	2	2.281527
BCRP (ABCG2)	MSTO	2	2.07053
IAP1	MSTO	2	1.972465
IAP2	MSTO	2	145.0091
ILF3	MSTO	2	0.435275
Birc5	MSTO	2	1.394744
ABCG2	MSTO	2	8.938297
XIAP	MSTO	2	3.271608
OCT1	VMC23	1	0.336808
MDR1 (ABCB1)	VMC23	1	1663.493
MRP1	VMC23	1	0.273573
BCRP (ABCG2)	VMC23	1	0.096723
IAP1	VMC23	1	1.443929
IAP2	VMC23	1	128.8903
ILF3	VMC23	1	0.138696
Birc5	VMC23	1	0.181747
ABCG2	VMC23	1	0.503478
XIAP	VMC23	1	1.079228
OCT1	VMC23	2	0.554785
MDR1 (ABCB1)	VMC23	2	1045.516
MRP1	VMC23	2	0.255253
BCRP (ABCG2)	VMC23	2	0.144586
IAP1	VMC23	2	0.882703
IAP2	VMC23	2	128
ILF3	VMC23	2	0.271684
Birc5	VMC23	2	0.241484
ABCG2	VMC23	2	0.429283
XIAP	VMC23	2	1.028114
OCT1	MM05	1	14.723
MDR1 (ABCB1)	MM05	1	6208.375
MRP1	MM05	1	86.82268
BCRP (ABCG2)	MM05	1	6.964405
IAP1	MM05	1	14.92853
IAP2	MM05	1	300.2457
ILF3	MM05	1	8.693879
Birc5	MM05	1	5.278032
ABCG2	MM05	1	27.28432
XIAP	MM05	1	30.69645
OCT1	MM05	2	13.36141
MDR1 (ABCB1)	MM05	2	3795.305
MRP1	MM05	2	38.31932
BCRP (ABCG2)	MM05	2	6.821079
IAP1	MM05	2	9.513657
IAP2	MM05	2	227.5437
ILF3	MM05	2	8.815241
Birc5	MM05	2	3.160165
ABCG2	MM05	2	14.82541
XIAP	MM05	2	14.92853

##########
data_figure3b_ABCA6_ABCA10.txt

gene	experiment	cellline	fold_change
ABCA6	1	H226	0.027
ABCA10	1	H226	0.1767
ABCA6	2	H226	0.115
ABCA10	2	H226	0.108
ABCA6	1	Ren	0.819
ABCA10	1	Ren	0.5769
ABCA6	2	Ren	0.359
ABCA10	2	Ren	0.3028
ABCA6	1	VMC40	1.692
ABCA10	1	VMC40	0.7385
ABCA6	2	VMC40	1.42
ABCA10	2	VMC40	0.8346
ABCA6	1	MET5A	1
ABCA10	1	MET5A	1
ABCA6	2	MET5A	1.339
ABCA10	2	MET5A	1.3583
ABCA6	1	VMC20	1.106
ABCA10	1	VMC20	1.9642
ABCA6	2	VMC20	1.121
ABCA10	2	VMC20	2.0238
ABCA6	1	H2052	4.491
ABCA10	1	H2052	2.5279
ABCA6	2	H2052	4.314
ABCA10	2	H2052	3.0712
ABCA6	1	H2452	17.07
ABCA10	1	H2452	6.0755
ABCA6	2	H2452	17.957
ABCA10	2	H2452	8.1353
ABCA6	1	H28	11.576
ABCA10	1	H28	9.2984
ABCA6	2	H28	11.943
ABCA10	2	H28	8.5132
ABCA6	1	MSTO	24.7
ABCA10	1	MSTO	29.0602
ABCA6	2	MSTO	26.541
ABCA10	2	MSTO	27.7687
ABCA6	1	VMC23	327.073
ABCA10	1	VMC23	105.8134
ABCA6	2	VMC23	324.24
ABCA10	2	VMC23	124.814
ABCA6	1	MM05	242.221
ABCA10	1	MM05	215.2625
ABCA6	2	MM05	251.456
ABCA10	2	MM05	208.947

##########
data_figure2a_ym155_02.txt

cellline	dose	drug	experiment	viability
H28	0.00512	YM155	1	100
H28	0.0256	YM155	1	119
H28	0.128	YM155	1	113
H28	0.64	YM155	1	119
H28	3.2	YM155	1	66
H28	16	YM155	1	36
H28	80	YM155	1	18
H28	400	YM155	1	10
H28	2000	YM155	1	6
H28	0.00512	YM155	2	100
H28	0.0256	YM155	2	99
H28	0.128	YM155	2	102
H28	0.64	YM155	2	58
H28	3.2	YM155	2	20
H28	16	YM155	2	17
H28	80	YM155	2	10
H28	400	YM155	2	10
H28	2000	YM155	2	5
H28	0.00512	YM155	3	100
H28	0.0256	YM155	3	100
H28	0.128	YM155	3	95
H28	0.64	YM155	3	38
H28	3.2	YM155	3	23
H28	16	YM155	3	15
H28	80	YM155	3	10
H28	400	YM155	3	13
H28	2000	YM155	3	7
H226	0.00512	YM155	1	100
H226	0.0256	YM155	1	98
H226	0.128	YM155	1	103
H226	0.64	YM155	1	104
H226	3.2	YM155	1	32
H226	16	YM155	1	11
H226	80	YM155	1	10
H226	400	YM155	1	5
H226	2000	YM155	1	8
H226	0.00512	YM155	2	100
H226	0.0256	YM155	2	116
H226	0.128	YM155	2	105
H226	0.64	YM155	2	104
H226	3.2	YM155	2	14
H226	16	YM155	2	7
H226	80	YM155	2	10
H226	400	YM155	2	7
H226	2000	YM155	2	5
H226	0.00512	YM155	3	100
H226	0.0256	YM155	3	107
H226	0.128	YM155	3	99
H226	0.64	YM155	3	44
H226	3.2	YM155	3	12
H226	16	YM155	3	7
H226	80	YM155	3	6
H226	400	YM155	3	6
H226	2000	YM155	3	5
H2052	0.00512	YM155	1	100
H2052	0.0256	YM155	1	91
H2052	0.128	YM155	1	97
H2052	0.64	YM155	1	91
H2052	3.2	YM155	1	73
H2052	16	YM155	1	34
H2052	80	YM155	1	5
H2052	400	YM155	1	4
H2052	2000	YM155	1	4
H2052	0.00512	YM155	2	100
H2052	0.0256	YM155	2	107
H2052	0.128	YM155	2	100
H2052	0.64	YM155	2	99
H2052	3.2	YM155	2	89
H2052	16	YM155	2	26
H2052	80	YM155	2	9
H2052	400	YM155	2	8
H2052	2000	YM155	2	5
H2052	0.00512	YM155	3	100
H2052	0.0256	YM155	3	99
H2052	0.128	YM155	3	101
H2052	0.64	YM155	3	92
H2052	3.2	YM155	3	42
H2052	16	YM155	3	8
H2052	80	YM155	3	3
H2052	400	YM155	3	2
H2052	2000	YM155	3	4
H2452	0.00512	YM155	1	100
H2452	0.0256	YM155	1	110
H2452	0.128	YM155	1	107
H2452	0.64	YM155	1	104
H2452	3.2	YM155	1	100
H2452	16	YM155	1	31
H2452	80	YM155	1	12
H2452	400	YM155	1	5
H2452	2000	YM155	1	4
H2452	0.00512	YM155	2	100
H2452	0.0256	YM155	2	122
H2452	0.128	YM155	2	118
H2452	0.64	YM155	2	103
H2452	3.2	YM155	2	81
H2452	16	YM155	2	36
H2452	80	YM155	2	14
H2452	400	YM155	2	8
H2452	2000	YM155	2	6
H2452	0.00512	YM155	3	100
H2452	0.0256	YM155	3	105
H2452	0.128	YM155	3	111
H2452	0.64	YM155	3	91
H2452	3.2	YM155	3	54
H2452	16	YM155	3	29
H2452	80	YM155	3	6
H2452	400	YM155	3	2
H2452	2000	YM155	3	4
MET5A	0.00512	YM155	1	100
MET5A	0.0256	YM155	1	94
MET5A	0.128	YM155	1	115
MET5A	0.64	YM155	1	108
MET5A	3.2	YM155	1	80
MET5A	16	YM155	1	15
MET5A	80	YM155	1	4
MET5A	400	YM155	1	6
MET5A	2000	YM155	1	1
MET5A	0.00512	YM155	2	100
MET5A	0.0256	YM155	2	101
MET5A	0.128	YM155	2	107
MET5A	0.64	YM155	2	86
MET5A	3.2	YM155	2	46
MET5A	16	YM155	2	11
MET5A	80	YM155	2	7
MET5A	400	YM155	2	7
MET5A	2000	YM155	2	6
MET5A	0.00512	YM155	3	100
MET5A	0.0256	YM155	3	96
MET5A	0.128	YM155	3	88
MET5A	0.64	YM155	3	75
MET5A	3.2	YM155	3	21
MET5A	16	YM155	3	10
MET5A	80	YM155	3	9
MET5A	400	YM155	3	8
MET5A	2000	YM155	3	6
MM05	0.00512	YM155	1	100
MM05	0.0256	YM155	1	95
MM05	0.128	YM155	1	101
MM05	0.64	YM155	1	100
MM05	3.2	YM155	1	98
MM05	16	YM155	1	100
MM05	80	YM155	1	82
MM05	400	YM155	1	48
MM05	2000	YM155	1	18
MM05	0.00512	YM155	2	100
MM05	0.0256	YM155	2	125
MM05	0.128	YM155	2	139
MM05	0.64	YM155	2	123
MM05	3.2	YM155	2	116
MM05	16	YM155	2	116
MM05	80	YM155	2	98
MM05	400	YM155	2	44
MM05	2000	YM155	2	13
MM05	0.00512	YM155	3	100
MM05	0.0256	YM155	3	103
MM05	0.128	YM155	3	109
MM05	0.64	YM155	3	88
MM05	3.2	YM155	3	91
MM05	16	YM155	3	89
MM05	80	YM155	3	60
MM05	400	YM155	3	19
MM05	2000	YM155	3	9
MSTO_211H	0.00512	YM155	1	100
MSTO_211H	0.0256	YM155	1	119
MSTO_211H	0.128	YM155	1	117
MSTO_211H	0.64	YM155	1	106
MSTO_211H	3.2	YM155	1	113
MSTO_211H	16	YM155	1	70
MSTO_211H	80	YM155	1	24
MSTO_211H	400	YM155	1	5
MSTO_211H	2000	YM155	1	4
MSTO_211H	0.00512	YM155	2	100
MSTO_211H	0.0256	YM155	2	101
MSTO_211H	0.128	YM155	2	107
MSTO_211H	0.64	YM155	2	98
MSTO_211H	3.2	YM155	2	106
MSTO_211H	16	YM155	2	60
MSTO_211H	80	YM155	2	7
MSTO_211H	400	YM155	2	2
MSTO_211H	2000	YM155	2	1
MSTO_211H	0.00512	YM155	3	100
MSTO_211H	0.0256	YM155	3	96
MSTO_211H	0.128	YM155	3	95
MSTO_211H	0.64	YM155	3	94
MSTO_211H	3.2	YM155	3	89
MSTO_211H	16	YM155	3	71
MSTO_211H	80	YM155	3	10
MSTO_211H	400	YM155	3	6
MSTO_211H	2000	YM155	3	4
Ren	0.00512	YM155	1	100
Ren	0.0256	YM155	1	103
Ren	0.128	YM155	1	114
Ren	0.64	YM155	1	77
Ren	3.2	YM155	1	27
Ren	16	YM155	1	8
Ren	80	YM155	1	2
Ren	400	YM155	1	1
Ren	2000	YM155	1	4
Ren	0.00512	YM155	2	100
Ren	0.0256	YM155	2	101
Ren	0.128	YM155	2	100
Ren	0.64	YM155	2	26
Ren	3.2	YM155	2	11
Ren	16	YM155	2	4
Ren	80	YM155	2	4
Ren	400	YM155	2	2
Ren	2000	YM155	2	3
Ren	0.00512	YM155	3	100
Ren	0.0256	YM155	3	88
Ren	0.128	YM155	3	72
Ren	0.64	YM155	3	15
Ren	3.2	YM155	3	11
Ren	16	YM155	3	6
Ren	80	YM155	3	5
Ren	400	YM155	3	4
Ren	2000	YM155	3	5
VMC20	0.00512	YM155	1	100
VMC20	0.0256	YM155	1	105
VMC20	0.128	YM155	1	101
VMC20	0.64	YM155	1	92
VMC20	3.2	YM155	1	49
VMC20	16	YM155	1	11
VMC20	80	YM155	1	5
VMC20	400	YM155	1	4
VMC20	2000	YM155	1	2
VMC20	0.00512	YM155	2	100
VMC20	0.0256	YM155	2	105
VMC20	0.128	YM155	2	98
VMC20	0.64	YM155	2	58
VMC20	3.2	YM155	2	29
VMC20	16	YM155	2	3
VMC20	80	YM155	2	6
VMC20	400	YM155	2	5
VMC20	2000	YM155	2	4
VMC20	0.00512	YM155	3	100
VMC20	0.0256	YM155	3	90
VMC20	0.128	YM155	3	52
VMC20	0.64	YM155	3	27
VMC20	3.2	YM155	3	7
VMC20	16	YM155	3	6
VMC20	80	YM155	3	7
VMC20	400	YM155	3	7
VMC20	2000	YM155	3	6
VMC23	0.00512	YM155	1	100
VMC23	0.0256	YM155	1	101
VMC23	0.128	YM155	1	107
VMC23	0.64	YM155	1	108
VMC23	3.2	YM155	1	100
VMC23	16	YM155	1	68
VMC23	80	YM155	1	33
VMC23	400	YM155	1	13
VMC23	2000	YM155	1	9
VMC23	0.00512	YM155	2	100
VMC23	0.0256	YM155	2	107
VMC23	0.128	YM155	2	97
VMC23	0.64	YM155	2	102
VMC23	3.2	YM155	2	95
VMC23	16	YM155	2	66
VMC23	80	YM155	2	20
VMC23	400	YM155	2	10
VMC23	2000	YM155	2	8
VMC23	0.00512	YM155	3	100
VMC23	0.0256	YM155	3	100
VMC23	0.128	YM155	3	102
VMC23	0.64	YM155	3	94
VMC23	3.2	YM155	3	92
VMC23	16	YM155	3	46
VMC23	80	YM155	3	19
VMC23	400	YM155	3	10
VMC23	2000	YM155	3	12
VMC40	0.00512	YM155	1	100
VMC40	0.0256	YM155	1	100
VMC40	0.128	YM155	1	99
VMC40	0.64	YM155	1	79
VMC40	3.2	YM155	1	36
VMC40	16	YM155	1	6
VMC40	80	YM155	1	4
VMC40	400	YM155	1	11
VMC40	2000	YM155	1	13
VMC40	0.00512	YM155	2	100
VMC40	0.0256	YM155	2	102
VMC40	0.128	YM155	2	99
VMC40	0.64	YM155	2	62
VMC40	3.2	YM155	2	24
VMC40	16	YM155	2	10
VMC40	80	YM155	2	19
VMC40	400	YM155	2	8
VMC40	2000	YM155	2	13
VMC40	0.00512	YM155	3	100
VMC40	0.0256	YM155	3	93
VMC40	0.128	YM155	3	75
VMC40	0.64	YM155	3	37
VMC40	3.2	YM155	3	16
VMC40	16	YM155	3	14
VMC40	80	YM155	3	10
VMC40	400	YM155	3	8
VMC40	2000	YM155	3	8

##########
data_figure3c_figure3d_ABCA6_ABCA10.txt

cellline	dose	drug_treatment	sirna_treatment	growth	experiment
MSTO	0	YM155	C81 (for ABC6)	98.6753032	1
MSTO	0.01024	YM155	C81 (for ABC6)	98.3451926	1
MSTO	0.0512	YM155	C81 (for ABC6)	100.483538	1
MSTO	0.256	YM155	C81 (for ABC6)	99.961714	1
MSTO	1.28	YM155	C81 (for ABC6)	97.7632448	1
MSTO	6.4	YM155	C81 (for ABC6)	93.3572314	1
MSTO	32	YM155	C81 (for ABC6)	34.190846	1
MSTO	160	YM155	C81 (for ABC6)	6.64532102	1
MSTO	800	YM155	C81 (for ABC6)	3.22169882	1
MSTO	4000	YM155	C81 (for ABC6)	2.84734649	1
MSTO	0	YM155	C81 (for ABC6)	101.324697	2
MSTO	0.01024	YM155	C81 (for ABC6)	101.3281	2
MSTO	0.0512	YM155	C81 (for ABC6)	104.645656	2
MSTO	0.256	YM155	C81 (for ABC6)	102.275325	2
MSTO	1.28	YM155	C81 (for ABC6)	100.356486	2
MSTO	6.4	YM155	C81 (for ABC6)	97.661716	2
MSTO	32	YM155	C81 (for ABC6)	30.9889991	2
MSTO	160	YM155	C81 (for ABC6)	8.01851342	2
MSTO	800	YM155	C81 (for ABC6)	3.21319081	2
MSTO	4000	YM155	C81 (for ABC6)	2.8592577	2
MSTO	0	YM155	si-ABC6-02	88.1803924	1
MSTO	0.01024	YM155	si-ABC6-02	90.7407355	1
MSTO	0.0512	YM155	si-ABC6-02	85.9529961	1
MSTO	0.256	YM155	si-ABC6-02	88.7430553	1
MSTO	1.28	YM155	si-ABC6-02	87.0942035	1
MSTO	6.4	YM155	si-ABC6-02	77.9220043	1
MSTO	32	YM155	si-ABC6-02	49.5619794	1
MSTO	160	YM155	si-ABC6-02	14.9786307	1
MSTO	800	YM155	si-ABC6-02	4.1099348	1
MSTO	4000	YM155	si-ABC6-02	3.05947948	1
MSTO	0	YM155	si-ABC6-02	87.1310715	2
MSTO	0.01024	YM155	si-ABC6-02	88.8423154	2
MSTO	0.0512	YM155	si-ABC6-02	87.5473967	2
MSTO	0.256	YM155	si-ABC6-02	86.3642165	2
MSTO	1.28	YM155	si-ABC6-02	87.6608368	2
MSTO	6.4	YM155	si-ABC6-02	75.7524624	2
MSTO	32	YM155	si-ABC6-02	47.3924375	2
MSTO	160	YM155	si-ABC6-02	13.1794707	2
MSTO	800	YM155	si-ABC6-02	4.05661795	2
MSTO	4000	YM155	si-ABC6-02	3.28125487	2
MSTO	0	YM155	si-ABC6-01	69.4616416	1
MSTO	0.01024	YM155	si-ABC6-01	73.8937463	1
MSTO	0.0512	YM155	si-ABC6-01	71.4990258	1
MSTO	0.256	YM155	si-ABC6-01	69.6800138	1
MSTO	1.28	YM155	si-ABC6-01	76.4495518	1
MSTO	6.4	YM155	si-ABC6-01	22.7413367	1
MSTO	32	YM155	si-ABC6-01	16.7607747	1
MSTO	160	YM155	si-ABC6-01	3.93977465	1
MSTO	800	YM155	si-ABC6-01	2.84677929	1
MSTO	4000	YM155	si-ABC6-01	2.74978801	1
MSTO	0	YM155	si-ABC6-01	72.9794191	2
MSTO	0.01024	YM155	si-ABC6-01	69.4361176	2
MSTO	0.0512	YM155	si-ABC6-01	72.8268422	2
MSTO	0.256	YM155	si-ABC6-01	72.3214666	2
MSTO	1.28	YM155	si-ABC6-01	68.9511612	2
MSTO	6.4	YM155	si-ABC6-01	23.0867618	2
MSTO	32	YM155	si-ABC6-01	12.8624057	2
MSTO	160	YM155	si-ABC6-01	3.88815941	2
MSTO	800	YM155	si-ABC6-01	2.88081132	2
MSTO	4000	YM155	si-ABC6-01	2.7446832	2
MSTO	0	YM155	C81 (for ABC10)	100.772937	1
MSTO	0.01024	YM155	C81 (for ABC10)	102.118966	1
MSTO	0.0512	YM155	C81 (for ABC10)	103.492829	1
MSTO	0.256	YM155	C81 (for ABC10)	102.280957	1
MSTO	1.28	YM155	C81 (for ABC10)	99.9123244	1
MSTO	6.4	YM155	C81 (for ABC10)	95.7128026	1
MSTO	32	YM155	C81 (for ABC10)	35.0824846	1
MSTO	160	YM155	C81 (for ABC10)	7.91474035	1
MSTO	800	YM155	C81 (for ABC10)	3.39290635	1
MSTO	4000	YM155	C81 (for ABC10)	2.86017273	1
MSTO	0	YM155	C81 (for ABC10)	99.2270631	2
MSTO	0.01024	YM155	C81 (for ABC10)	100.509632	2
MSTO	0.0512	YM155	C81 (for ABC10)	100.582556	2
MSTO	0.256	YM155	C81 (for ABC10)	99.0890088	2
MSTO	1.28	YM155	C81 (for ABC10)	98.0463651	2
MSTO	6.4	YM155	C81 (for ABC10)	92.3783466	2
MSTO	32	YM155	C81 (for ABC10)	36.2598426	2
MSTO	160	YM155	C81 (for ABC10)	8.41073372	2
MSTO	800	YM155	C81 (for ABC10)	3.4541401	2
MSTO	4000	YM155	C81 (for ABC10)	2.87130614	2
MSTO	0	YM155	si-ABC10-02	78.2678643	1
MSTO	0.01024	YM155	si-ABC10-02	83.8913491	1
MSTO	0.0512	YM155	si-ABC10-02	88.844046	1
MSTO	0.256	YM155	si-ABC10-02	88.0596973	1
MSTO	1.28	YM155	si-ABC10-02	91.2850459	1
MSTO	6.4	YM155	si-ABC10-02	86.3607391	1
MSTO	32	YM155	si-ABC10-02	25.409779	1
MSTO	160	YM155	si-ABC10-02	6.83535637	1
MSTO	800	YM155	si-ABC10-02	3.09675767	1
MSTO	4000	YM155	si-ABC10-02	2.7855789	1
MSTO	0	YM155	si-ABC10-02	86.9624999	2
MSTO	0.01024	YM155	si-ABC10-02	86.9597165	2
MSTO	0.0512	YM155	si-ABC10-02	90.3197793	2
MSTO	0.256	YM155	si-ABC10-02	92.3326997	2
MSTO	1.28	YM155	si-ABC10-02	92.1584618	2
MSTO	6.4	YM155	si-ABC10-02	88.6364079	2
MSTO	32	YM155	si-ABC10-02	29.6588445	2
MSTO	160	YM155	si-ABC10-02	6.26254248	2
MSTO	800	YM155	si-ABC10-02	2.9681668	2
MSTO	4000	YM155	si-ABC10-02	2.78724891	2
MSTO	0	YM155	si-ABC10-01	91.2366156	1
MSTO	0.01024	YM155	si-ABC10-01	91.4776539	1
MSTO	0.0512	YM155	si-ABC10-01	92.7596659	1
MSTO	0.256	YM155	si-ABC10-01	92.1050214	1
MSTO	1.28	YM155	si-ABC10-01	90.9543836	1
MSTO	6.4	YM155	si-ABC10-01	64.2653759	1
MSTO	32	YM155	si-ABC10-01	10.5260814	1
MSTO	160	YM155	si-ABC10-01	4.32031931	1
MSTO	800	YM155	si-ABC10-01	2.92530318	1
MSTO	4000	YM155	si-ABC10-01	2.71488175	1
MSTO	0	YM155	si-ABC10-01	90.4160833	2
MSTO	0.01024	YM155	si-ABC10-01	91.8227895	2
MSTO	0.0512	YM155	si-ABC10-01	95.1928724	2
MSTO	0.256	YM155	si-ABC10-01	94.8883737	2
MSTO	1.28	YM155	si-ABC10-01	93.953724	2
MSTO	6.4	YM155	si-ABC10-01	60.1165111	2
MSTO	32	YM155	si-ABC10-01	9.42498727	2
MSTO	160	YM155	si-ABC10-01	4.37542968	2
MSTO	800	YM155	si-ABC10-01	2.89357296	2
MSTO	4000	YM155	si-ABC10-01	2.68704823	2

##########
data_figure1d_PND1186.txt

cellline	dose	drug	mirna	experiment	growth
VMC23	0	PND-1186	C81	1	102.959548
VMC23	0.0000512	PND-1186	C81	1	99.70899
VMC23	0.000256	PND-1186	C81	1	119.821074
VMC23	0.00128	PND-1186	C81	1	115.800363
VMC23	0.0064	PND-1186	C81	1	107.121787
VMC23	0.032	PND-1186	C81	1	97.0154429
VMC23	0.16	PND-1186	C81	1	71.1689847
VMC23	0.8	PND-1186	C81	1	49.1238441
VMC23	4	PND-1186	C81	1	28.5508045
VMC23	20	PND-1186	C81	1	6.93251638
VMC23	0	PND-1186	C81	2	96.6693002
VMC23	0.0000512	PND-1186	C81	2	95.2767721
VMC23	0.000256	PND-1186	C81	2	99.7482082
VMC23	0.00128	PND-1186	C81	2	100.944646
VMC23	0.0064	PND-1186	C81	2	94.5532258
VMC23	0.032	PND-1186	C81	2	88.8097579
VMC23	0.16	PND-1186	C81	2	69.8384099
VMC23	0.8	PND-1186	C81	2	49.7638386
VMC23	4	PND-1186	C81	2	34.7012317
VMC23	20	PND-1186	C81	2	8.17840274
VMC23	0	PND-1186	miR-17-5p	1	98.8317471
VMC23	0.0000512	PND-1186	miR-17-5p	1	101.11658
VMC23	0.000256	PND-1186	miR-17-5p	1	98.5921735
VMC23	0.00128	PND-1186	miR-17-5p	1	98.1491769
VMC23	0.0064	PND-1186	miR-17-5p	1	95.1413341
VMC23	0.032	PND-1186	miR-17-5p	1	86.2752747
VMC23	0.16	PND-1186	miR-17-5p	1	71.4443854
VMC23	0.8	PND-1186	miR-17-5p	1	41.9314979
VMC23	4	PND-1186	miR-17-5p	1	6.87165557
VMC23	20	PND-1186	miR-17-5p	1	4.06539766
VMC23	0	PND-1186	miR-17-5p	2	101.901475
VMC23	0.0000512	PND-1186	miR-17-5p	2	94.784731
VMC23	0.000256	PND-1186	miR-17-5p	2	94.1530166
VMC23	0.00128	PND-1186	miR-17-5p	2	90.3339324
VMC23	0.0064	PND-1186	miR-17-5p	2	85.6276296
VMC23	0.032	PND-1186	miR-17-5p	2	78.8901597
VMC23	0.16	PND-1186	miR-17-5p	2	57.5895593
VMC23	0.8	PND-1186	miR-17-5p	2	38.0486908
VMC23	4	PND-1186	miR-17-5p	2	6.16764021
VMC23	20	PND-1186	miR-17-5p	2	3.96981332
VMC23	0	PND-1186	miR-221-3p	1	102.605249
VMC23	0.0000512	PND-1186	miR-221-3p	1	98.956347
VMC23	0.000256	PND-1186	miR-221-3p	1	102.003112
VMC23	0.00128	PND-1186	miR-221-3p	1	96.8312038
VMC23	0.0064	PND-1186	miR-221-3p	1	85.8709679
VMC23	0.032	PND-1186	miR-221-3p	1	73.6470724
VMC23	0.16	PND-1186	miR-221-3p	1	53.2450968
VMC23	0.8	PND-1186	miR-221-3p	1	35.4140408
VMC23	4	PND-1186	miR-221-3p	1	9.07639841
VMC23	20	PND-1186	miR-221-3p	1	5.10650773
VMC23	0	PND-1186	miR-221-3p	2	102.422578
VMC23	0.0000512	PND-1186	miR-221-3p	2	104.57779
VMC23	0.000256	PND-1186	miR-221-3p	2	107.598997
VMC23	0.00128	PND-1186	miR-221-3p	2	105.019056
VMC23	0.0064	PND-1186	miR-221-3p	2	92.6162489
VMC23	0.032	PND-1186	miR-221-3p	2	74.5709496
VMC23	0.16	PND-1186	miR-221-3p	2	53.1360959
VMC23	0.8	PND-1186	miR-221-3p	2	33.609135
VMC23	4	PND-1186	miR-221-3p	2	9.48458826
VMC23	20	PND-1186	miR-221-3p	2	5.13131485
VMC23	0	PND-1186	miR-222-3p	1	98.0932172
VMC23	0.0000512	PND-1186	miR-222-3p	1	93.4459898
VMC23	0.000256	PND-1186	miR-222-3p	1	90.43645
VMC23	0.00128	PND-1186	miR-222-3p	1	90.590261
VMC23	0.0064	PND-1186	miR-222-3p	1	80.812146
VMC23	0.032	PND-1186	miR-222-3p	1	64.0929742
VMC23	0.16	PND-1186	miR-222-3p	1	47.8067849
VMC23	0.8	PND-1186	miR-222-3p	1	29.3485702
VMC23	4	PND-1186	miR-222-3p	1	10.9241406
VMC23	20	PND-1186	miR-222-3p	1	6.13554932
VMC23	0	PND-1186	miR-222-3p	2	102.78312
VMC23	0.0000512	PND-1186	miR-222-3p	2	88.6707347
VMC23	0.000256	PND-1186	miR-222-3p	2	78.8170478
VMC23	0.00128	PND-1186	miR-222-3p	2	78.3067152
VMC23	0.0064	PND-1186	miR-222-3p	2	64.4895044
VMC23	0.032	PND-1186	miR-222-3p	2	54.4562231
VMC23	0.16	PND-1186	miR-222-3p	2	42.8857205
VMC23	0.8	PND-1186	miR-222-3p	2	30.7791019
VMC23	4	PND-1186	miR-222-3p	2	10.4982707
VMC23	20	PND-1186	miR-222-3p	2	6.13021483
VMC23	0	PND-1186	miR-137-3p	1	102.515755
VMC23	0.0000512	PND-1186	miR-137-3p	1	105.255358
VMC23	0.000256	PND-1186	miR-137-3p	1	102.16877
VMC23	0.00128	PND-1186	miR-137-3p	1	99.4581924
VMC23	0.0064	PND-1186	miR-137-3p	1	98.3110292
VMC23	0.032	PND-1186	miR-137-3p	1	91.3884699
VMC23	0.16	PND-1186	miR-137-3p	1	83.1162292
VMC23	0.8	PND-1186	miR-137-3p	1	59.0535079
VMC23	4	PND-1186	miR-137-3p	1	10.0394921
VMC23	20	PND-1186	miR-137-3p	1	4.54379538
VMC23	0	PND-1186	miR-137-3p	2	91.6589339
VMC23	0.0000512	PND-1186	miR-137-3p	2	95.4507074
VMC23	0.000256	PND-1186	miR-137-3p	2	95.0113683
VMC23	0.00128	PND-1186	miR-137-3p	2	90.7248435
VMC23	0.0064	PND-1186	miR-137-3p	2	92.4953933
VMC23	0.032	PND-1186	miR-137-3p	2	87.1441639
VMC23	0.16	PND-1186	miR-137-3p	2	80.1846632
VMC23	0.8	PND-1186	miR-137-3p	2	61.3359603
VMC23	4	PND-1186	miR-137-3p	2	10.1786822
VMC23	20	PND-1186	miR-137-3p	2	4.48244623
VMC23	0	PND-1186	miR-148a-3p	1	99.112
VMC23	0.0000512	PND-1186	miR-148a-3p	1	101.624
VMC23	0.000256	PND-1186	miR-148a-3p	1	102.789
VMC23	0.00128	PND-1186	miR-148a-3p	1	100.862
VMC23	0.0064	PND-1186	miR-148a-3p	1	101.036
VMC23	0.032	PND-1186	miR-148a-3p	1	93.4391
VMC23	0.16	PND-1186	miR-148a-3p	1	77.5299
VMC23	0.8	PND-1186	miR-148a-3p	1	53.5327
VMC23	4	PND-1186	miR-148a-3p	1	10.7476
VMC23	20	PND-1186	miR-148a-3p	1	4.93884
VMC23	0	PND-1186	miR-148a-3p	2	99.8568
VMC23	0.0000512	PND-1186	miR-148a-3p	2	108.862
VMC23	0.000256	PND-1186	miR-148a-3p	2	102.726
VMC23	0.00128	PND-1186	miR-148a-3p	2	99.1656
VMC23	0.0064	PND-1186	miR-148a-3p	2	100.311
VMC23	0.032	PND-1186	miR-148a-3p	2	91.3259
VMC23	0.16	PND-1186	miR-148a-3p	2	76.4193
VMC23	0.8	PND-1186	miR-148a-3p	2	55.6951
VMC23	4	PND-1186	miR-148a-3p	2	12.3324
VMC23	20	PND-1186	miR-148a-3p	2	4.79204
VMC23	0	PND-1186	miR-193a-3p	1	100.84117
VMC23	0.0000512	PND-1186	miR-193a-3p	1	94.8583476
VMC23	0.000256	PND-1186	miR-193a-3p	1	91.2035362
VMC23	0.00128	PND-1186	miR-193a-3p	1	82.1250854
VMC23	0.0064	PND-1186	miR-193a-3p	1	72.764887
VMC23	0.032	PND-1186	miR-193a-3p	1	63.5800621
VMC23	0.16	PND-1186	miR-193a-3p	1	45.1931624
VMC23	0.8	PND-1186	miR-193a-3p	1	24.6989063
VMC23	4	PND-1186	miR-193a-3p	1	7.39299704
VMC23	20	PND-1186	miR-193a-3p	1	4.86445693
VMC23	0	PND-1186	miR-193a-3p	2	97.4249811
VMC23	0.0000512	PND-1186	miR-193a-3p	2	88.5484972
VMC23	0.000256	PND-1186	miR-193a-3p	2	84.7384372
VMC23	0.00128	PND-1186	miR-193a-3p	2	78.0419028
VMC23	0.0064	PND-1186	miR-193a-3p	2	72.8662298
VMC23	0.032	PND-1186	miR-193a-3p	2	64.124151
VMC23	0.16	PND-1186	miR-193a-3p	2	47.8568263
VMC23	0.8	PND-1186	miR-193a-3p	2	26.6704201
VMC23	4	PND-1186	miR-193a-3p	2	7.25356078
VMC23	20	PND-1186	miR-193a-3p	2	4.81845734


##########
cat data_figure_2b_GW4869.txt

cellline	treatment	experiment	relative_exosome_production
H2052	control	1	1.423143
H28	control	1	1.017271
H226	control	1	1.129534
MSTO	control	1	1.405872
MM05	control	1	1.535406
VMC 20	control	1	1.518135
VMC23	control	1	1.509499
VMC40	control	1	1.613126
Met5A	control	1	0.887737
H2052	control	2	1.595855
H28	control	2	1.164076
H226	control	2	1.07772
MSTO	control	2	1.518135
MM05	control	2	1.587219
VMC 20	control	2	1.613126
VMC23	control	2	1.595855
VMC40	control	2	1.552677
Met5A	control	2	1.112263
H2052	GW4869	1	0.343696
H28	GW4869	1	0.404145
H226	GW4869	1	0.481865
MSTO	GW4869	1	0.84456
MM05	GW4869	1	0.749568
VMC 20	GW4869	1	0.654577
VMC23	GW4869	1	0.723661
VMC40	GW4869	1	0.464594
Met5A	GW4869	1	0.749568
H2052	GW4869	2	0.559585
H28	GW4869	2	0.395509
H226	GW4869	2	0.568221
MSTO	GW4869	2	0.559585
MM05	GW4869	2	0.568221
VMC 20	GW4869	2	0.464594
VMC23	GW4869	2	0.654577
VMC40	GW4869	2	0.568221
Met5A	GW4869	2	0.663212


##########


